[Xml-compile] Endpoint parameter change in XML-compile-soap 2.21

Daniel Strini dstrini at incognito.com
Sat Feb 5 15:59:57 GMT 2011


Sorry, I made a mistake in referencing the previous XML-Compile-SOAP version I used where this worked.  The previous version was 2.08 (in combination with XML-Compile 1.11).

Previously code like would work:

	my $wsdl = XML::Compile::WSDL11->new(/path/to/local/wsdlfile);
	my $foo = $wsdl->compileClient(operation => 'foo',
					service => 'BarService',
					endpoint => ["http://$target:2800/BarService/"]
					);

Then with $foo I could make the call:

	($answer,$trace) = $foo->(param1 => $value1,
                	           Parm2 => 'value',
                	           );


However after upping to XML-Compile-SOAP 2.21, (and XML-Compile 1.21 along with it),  The above doesn't work, the call will still be attempted, but it will ignore the 'endpoint' override I set, and instead attempt to connect based on the content in the wsdl file:

WSDL file snippet:
...
<service name="BarService">
		<port name="BarServicePort" binding="tns:BarServiceBinding">
			<soap:address location="http://localhost:8080/services/BarService"/>
		</port>
	</service>
...

It's that "location" reference in the wsdl that my 'endpoint' parameter was overriding in previous version.

>From the XML-Compile-WSDL11.pod it appears endpoint is allowed as an option:

=pod
Creates an XML::Compile::SOAP::Operation temporary object using operation(), 
and then calls compileClient() on that.

The OPTIONS available include all of the options for:
	operation() (i.e. service and port), and all of
	XML::Compile::SOAP::Operation::compileClient() (there are many of these, for instance transport_hook and server)
=cut

And within XML::Compile::SOAP::Operation::compileClient, it describes the 'endpoint','server','transport_hook', and 'transporter' options.




Just as a quick test I tried 'endpoints => ["http://$target:2800/BarService/"]'  but that fails the same way (still the WSDL file location is used)


Additional note:
   Yes, I can "workaround" the problem by fetching the .wsdl source via an HTTP ?WSDL lookup to the server,  but I'd much prefer to not have to fetch this and instead load the local file and apply that endpoint override.


-----Original Message-----
From: Mark Overmeer [mailto:mark at overmeer.net] 
Sent: Saturday, February 05, 2011 5:04 AM
To: Daniel Strini
Cc: XML-Compile
Subject: Re: [Xml-compile] Endpoint parameter change in XML-compile-soap 2.21

* Daniel Strini (dstrini at incognito.com) [110205 02:52]:
> In 2.11. I could specify 
> 
> $call->compileClient(... endpoint => URI );
> 
> And this would override the wsdl specified default location
> 
> Now with 2.21 the endpoint parameter isn't overriding the wsdl
> default anymore. Is there an easy way to correct for this change
> in the latest version?

I think that the option is called 'endpoints'.

If the interface has changed, than without intention. Any idea which
version you used before?
-- 
Regards,
               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net


_______________________________________________
Xml-compile mailing list
Xml-compile at lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile



More information about the Xml-compile mailing list