users@jaxb.java.net

Re: portnumbers in target namespaces

From: Trevor Paterson <trevor.paterson_at_roslin.ed.ac.uk>
Date: Fri, 27 Mar 2009 02:26:01 -0700 (PDT)

Hi

the port number was a red herring - the problem wasn't with the JAXB binding
but with the webservice invocation - calling the webservice works properly
when the WSDL address is specified at calling time...

however the JAXB binding created is not correct/ or not being invoked
properly when you invoke a service

apparently wsdl2java code generation is notoriously buggy

so i will separate my JAXB marshalling from my webservice code - so that i
can hoepfully understand what is going on




Wolfgang Laun-2 wrote:
>
> Hello Trevor,
>
> I've no experience with WSDL, but apparently it's calling xjc from
> wsdl2java.
>
> Calling xjc directly, with a schema containing a namespace URL with a
> portnumer
> is handled correctly, at least with JAXB 2.1.3 or later. In the package,
> there is an
> ObjectFactory.java, and it contains methods for creating top level schema
> elements, e,g,
> @XmlElementDecl(namespace =
> "http://www.biomart.org:80/MartServiceSoap",
> name = "ds")
> public JAXBElement<XXX> createXy(XXX value) {
> return new JAXBElement<XXX>(_Xy_QNAME, XXX.class, null, value);
> }
> and the final static String _Xy_QNAME should contain the correct
> (colon-ized) URI,
> so marshalling works correctly.
>
> Do you find this for the getRegistry element?
>
> Which JAXB version is bundled with that WSDL tool? Could you replace it
> or at least xjc with a new version?
>
> -W
>
>
> On Wed, Mar 25, 2009 at 2:07 PM, Trevor Paterson <
> trevor.paterson_at_roslin.ed.ac.uk> wrote:
>
>>
>> I am having problems generating client code from a WSDL, which I suspect
>> may
>> be because the WSDL imports a schema which has a targetNamespace which
>> includes a port number.
>>
>> the WSDL types:
>>
>> <types>
>> <xsd:schema>
>> <xsd:import namespace="http://www.biomart.org:80/MartServiceSoap"
>> ="martxsd" />
>> </xsd:schema>
>> </types>
>>
>> the schema declaration:
>>
>> <xs:schema
>> xmlns:tns="http://www.biomart.org:80/MartServiceSoap"
>> xmlns:xs="http://www.w3.org/2001/XMLSchema"
>> xmlns:sawsdl="http://www.w3.org/ns/sawsdl"
>> targetNamespace="http://www.biomart.org:80/MartServiceSoap"
>> version="1.0">
>>
>> wsdl2java by default generates client code in the package
>> org.biomart._80.martservicesoap
>>
>> a SOAP request generated from client code generated using wsdl2java:
>>
>> <soap:Body>
>> <ns1:getRegistry xmlns:ns1="http://martservicesoap._80.biomart.org"
>> />
>> </soap:Body>
>>
>> Am I naïve in thinking that xmlns:ns1 should =
>> "http://www.biomart.org:80/MartServiceSoap" in order to match the schema
>> namespace for the service?
>>
>> Is the namespace in the SOAP request made on the fly from the package
>> name
>> of the code? and therefore is the “:80” insurmountable?
>>
>> Is there a way to set the namespaces generated?
>>
>> thanks
>> Trevor Paterson, Roslin Institute
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/portnumbers-in-target-namespaces-tp22701423p22701423.html
>> Sent from the java.net - jaxb users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>>
>
>

-- 
View this message in context: http://www.nabble.com/portnumbers-in-target-namespaces-tp22701423p22738286.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.