You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Andreas Veithen-Knowles <an...@gmail.com> on 2022/06/02 22:42:59 UTC

Re: Error when amending WSDL Endpoint serialization unit tests

I think the problem is your change in WSDLEndpointFactory.createEndpoint,
specifically this line:

wsdlEndpoint.setWsdlURI(injectEnvironmentVariables(wsdlURI).trim());

A few lines after that, the original wsdlURI is used in the following
expression:

new URL(wsdlURI)

That results in an error.

Andreas

On Wed, May 18, 2022 at 8:59 AM Nuwan Jayawardene <ns...@gmail.com> wrote:

> Hi All,
> I've been working on writing new unit tests related to the $subject and
> encountered the following error with a build failure.
>
> [image: image.png]
>
> My implementation involves adding a new generic method to
> the DefaultEndpointFactory. The associated commit can be found here
> <https://github.com/apache/synapse/pull/55/commits/7b330d3503475ce5e7b3c51007f42c39d3f4806b>
> .
> While the existing testWSDLEndpointSerializationTest()
> <https://github.com/apache/synapse/blob/d7e0f773b2daa7b4bb8f2148cf45789c1ca45b24/modules/core/src/test/java/org/apache/synapse/config/xml/SendMediatorSerializationTest.java#L116>
> method operates fine [with my new generic method], the test fails when I
> create a new test method and use the exact same parameters as show here
> <https://github.com/apache/synapse/blob/d7e0f773b2daa7b4bb8f2148cf45789c1ca45b24/modules/core/src/test/java/org/apache/synapse/config/xml/SendMediatorSerializationTest.java#L153>
> .
> SOAP endpoint serialization testing with my implementation works fine.
>
> Not sure if this is an issue with how my test is written or how WSDL URI
> are formulated.
> Would appreciate some thoughts on this or can be discussed during the upcoming
> code review <https://meet.google.com/yob-sfhb-usk> on Friday (20th) this
> week.
>
> Kind regards
> --
> *Nuwan Jayawardene*
> Assistant Lecturer, Informatics Institute of Technology (IIT).
> Research Assistant, University of Moratuwa
>
> https://www.linkedin.com/m/in/nuwanjaya
>
>
>

Re: Error when amending WSDL Endpoint serialization unit tests

Posted by Nuwan Jayawardene <ns...@gmail.com>.
Noted Andreas and thank you!
I had a code review with @Isuru Udana <is...@gmail.com> and he pointed
this out along with a couple of other changes.
Currently working on finalizing them.

Will update this thread with the PR link once finalized.
Kind regards




On Fri, Jun 3, 2022 at 4:13 AM Andreas Veithen-Knowles <
andreas.veithen@gmail.com> wrote:

> I think the problem is your change in WSDLEndpointFactory.createEndpoint,
> specifically this line:
>
> wsdlEndpoint.setWsdlURI(injectEnvironmentVariables(wsdlURI).trim());
>
> A few lines after that, the original wsdlURI is used in the following
> expression:
>
> new URL(wsdlURI)
>
> That results in an error.
>
> Andreas
>
> On Wed, May 18, 2022 at 8:59 AM Nuwan Jayawardene <ns...@gmail.com>
> wrote:
>
>> Hi All,
>> I've been working on writing new unit tests related to the $subject and
>> encountered the following error with a build failure.
>>
>> [image: image.png]
>>
>> My implementation involves adding a new generic method to
>> the DefaultEndpointFactory. The associated commit can be found here
>> <https://github.com/apache/synapse/pull/55/commits/7b330d3503475ce5e7b3c51007f42c39d3f4806b>
>> .
>> While the existing testWSDLEndpointSerializationTest()
>> <https://github.com/apache/synapse/blob/d7e0f773b2daa7b4bb8f2148cf45789c1ca45b24/modules/core/src/test/java/org/apache/synapse/config/xml/SendMediatorSerializationTest.java#L116>
>> method operates fine [with my new generic method], the test fails when I
>> create a new test method and use the exact same parameters as show here
>> <https://github.com/apache/synapse/blob/d7e0f773b2daa7b4bb8f2148cf45789c1ca45b24/modules/core/src/test/java/org/apache/synapse/config/xml/SendMediatorSerializationTest.java#L153>
>> .
>> SOAP endpoint serialization testing with my implementation works fine.
>>
>> Not sure if this is an issue with how my test is written or how WSDL URI
>> are formulated.
>> Would appreciate some thoughts on this or can be discussed during the upcoming
>> code review <https://meet.google.com/yob-sfhb-usk> on Friday (20th) this
>> week.
>>
>> Kind regards
>> --
>> *Nuwan Jayawardene*
>> Assistant Lecturer, Informatics Institute of Technology (IIT).
>> Research Assistant, University of Moratuwa
>>
>> https://www.linkedin.com/m/in/nuwanjaya
>>
>>
>>

-- 
*Nuwan Jayawardene*
Assistant Lecturer, Informatics Institute of Technology (IIT).
Research Assistant, University of Moratuwa

https://www.linkedin.com/m/in/nuwanjaya