Hello All,
I have been stuck on this for a few days. I have a
WSDL here:
http://www.pgink.com/wsdl/RecordRetrievalGateway.wsdl
I generate a client/server using the Eclipse xfire
plugin. I add a simple main method to my generated
client class and the server is unable to read the
parameters. I checked the invocation in TCPMON and
the soap message generated from the JaxB object is
indeed incorrect. Here is the main method in my
client:
public static void main(String args[])
{
RecordRetrievalServiceClient client = new
RecordRetrievalServiceClient();
RecordRetrievalInvocationType recordRetrieval =
new RecordRetrievalInvocationType();
recordRetrieval.setRecordURI("http://www.yahoo.com");
System.out.println(recordRetrieval.getRecordURI());
RecordRetrievalReturnType returnType = null;
try {
WijisMessageTrackingInfoType messageTrackingInfo =
null;
Holder<WijisMessageTrackingInfoType>
messageTrackingInfo2 = null;
returnType =
client.getRecordRetrievalServiceSOAP("http://localhost:8088/recordRetrievalService/services/recordRetrieval").retrieveRecords(recordRetrieval,
messageTrackingInfo, messageTrackingInfo2);
} catch (RetrieveRecordsError e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println(returnType.getRecordSourceContactInfo().getContactName());
}
Here is the Soap message in TCPMON:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><ns6:recordRetrievalRequest
xmlns:ns6="http://wijis.wisconsin.gov/specs/schemas/gateway/service/recordRetrieval/v1.0/"
xmlns:ns5="http://wijis.wisconsin.gov/specs/schemas/record/v1.0/2006-05-25/"
xmlns:ns4="http://wijis.wisconsin.gov/specs/schemas/util/v1.0/2006-05-25/"
xmlns:ns3="http://wijis.wisconsin.gov/specs/schemas/gateway/pointer/v1.0/2006-05-25/"
xmlns:ns2="http://wijis.wisconsin.gov/specs/schemas/service/v1.0/2006-05-25/"
xmlns="http://wijis.wisconsin.gov/specs/schemas/uri/v1.0/2006-05-25/"
recordURI="http://www.yahoo.com"
/></soap:Body></soap:Envelope>
The 'recordURI' attribute should have a namespace of
URI, however it takes its parent default namespace so
the server does not now what the 'recordURI' parameter
is.
Can someone try this WSDL? I ran in through a
debugger and it looks like JAXB might be marshalling
the object wrong.
To replicate this behavior, it is sufficient to just
the client with the main method. You can see what it
is generated on TCPMON.
Any help would be appreciated. I am hitting the wall
with this one.
Thanks!
Yogesh
--- Yogesh Chawla - PD <[EMAIL PROTECTED]>
wrote:
> Hello All,
> Has anybody seen anything like this: I generate
> server/client stubs using JAXB and the xfire plugin.
>
> I invoke my service from the client and use TCPMON
> to
> look at the raw soap message.
>
> The input parameter to the web service has the wrong
> default namespace. Here is an example:
>
> <ns6:recordRetrievalRequest
>
xmlns:ns6="http://wijis.wisconsin.gov/specs/schemas/gateway/service/recordRetrieval/v1.0/"
>
xmlns:ns5="http://wijis.wisconsin.gov/specs/schemas/record/v1.0/2006-05-25/"
>
xmlns:ns4="http://wijis.wisconsin.gov/specs/schemas/util/v1.0/2006-05-25/"
>
xmlns:ns3="http://wijis.wisconsin.gov/specs/schemas/gateway/pointer/v1.0/2006-05-25/"
>
xmlns:ns2="http://wijis.wisconsin.gov/specs/schemas/service/v1.0/2006-05-25/"
>
xmlns="http://wijis.wisconsin.gov/specs/schemas/uri/v1.0/2006-05-25/"
> recordURI="http://www.yahoo.com" />
>
> Notice how the default namespace is something
> called:
>
xmlns="http://wijis.wisconsin.gov/specs/schemas/uri/v1.0/2006-05-25/"
>
> However, in my schema, the default namespace of this
> element is:
>
http://wijis.wisconsin.gov/specs/schemas/gateway/service/recordRetrieval/v1.0/
>
> The web service can not serialize this object and I
> get a null for 'recordURI'. However if I manuall
> construct a proper soap message, the service works
> fine.
>
> It looks the Xfire client is generating an incorrect
> namespace for the web service input parameter.
>
> The absolutely maddening thing is that I have an
> identical service using the same inheritance model
> and
> the client has no such problems. All the soap
> message
> on the wire have the correct namespace.
>
> Has anyone seen this before? I am on hour 10 on
> this
> problem. I even removed all default namespaces for
> each schema and qualified every type. This produced
> the same results.
>
> Thanks!
>
> -Yogesh
>
>
>
---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email