users@jax-rpc.java.net

Re: client stubs

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Thu, 18 Nov 2004 09:18:07 -0800

Can you include the WSDL that you are generating the client from?

Potter, Brian L wrote:

> I'm having a problem creating client stubs from a WSDL with both JWSDP
> 1.3 and SUN J2EE 1.4 SDK AppServer:
>
> $ wscompile -gen:client -keep config.xml
> IAccessManagerObj_connect_connectRequest_connectResponse_Fault_SOAPSerializer.java:22:
> ns1_fault_QNAME is already defined in
> accessManager.IAccessManagerObj_connect_connectRequest_connectResponse_Fault_SOAPSerializer
> private static final QName ns1_fault_QNAME = new
> QName("urn:AccessManager","fault");
>
> here's the code that caused the error:
>
> public class
> IAccessManagerObj_connect_connectRequest_connectResponse_Fault_SOAPSerializer
> extends SOAPFaultInfoSerializer {
> private static final QName ns1_fault_QNAME = new
> QName("urn:AccessManager", "fault");
> private static final QName ns2_InvalidInputException_TYPE_QNAME =
> new QName("http://util.services.oai.prc.com", "InvalidInputException");
> private CombinedSerializer ns2_myInvalidInputException_SOAPSerializer;
> private CombinedSerializer
> ns2_myInvalidInputException_SOAPSerializer_Serializer;
> private static final QName ns1_fault_QNAME = new
> QName("urn:AccessManager", "fault");
> private static final QName ns3_ExpiredPasswordException_TYPE_QNAME =
> new QName("http://security.services.oai.prc.com",
> "ExpiredPasswordException");
> private CombinedSerializer
> ns3_myExpiredPasswordException_SOAPSerializer;
> private CombinedSerializer
> ns3_myExpiredPasswordException_SOAPSerializer_Serializer;
> private static final QName ns1_fault_QNAME = new
> QName("urn:AccessManager", "fault");
> private static final QName
> ns3_InvalidCredentialsException_TYPE_QNAME = new
> QName("http://security.services.oai.prc.com",
> "InvalidCredentialsException");
> private CombinedSerializer
> ns3_myInvalidCredentialsException_SOAPSerializer;
> private CombinedSerializer
> ns3_myInvalidCredentialsException_SOAPSerializer_Serializer;
> private static final QName ns1_fault_QNAME = new
> QName("urn:AccessManager", "fault");
> private static final QName ns3_LockedAccountException_TYPE_QNAME =
> new QName("http://security.services.oai.prc.com",
> "LockedAccountException");
> private CombinedSerializer ns3_myLockedAccountException_SOAPSerializer;
> private CombinedSerializer
> ns3_myLockedAccountException_SOAPSerializer_Serializer;
> private static final int ACCESSMANAGER_INVALIDINPUTEXCEPTION_INDEX = 0;
> private static final int
> ACCESSMANAGER_EXPIREDPASSWORDEXCEPTION_INDEX = 1;
> private static final int
> ACCESSMANAGER_INVALIDCREDENTIALSEXCEPTION_INDEX = 2;
> private static final int ACCESSMANAGER_LOCKEDACCOUNTEXCEPTION_INDEX = 3;
>
> for some reason, the ns1_fault_QNAME variable is multiply defined. if
> i comment out all but the first instance, i can build the client. but
> when i run it, i get a crash when the client deserializes the response:
>
> java.rmi.RemoteException: Runtime exception; nested exception is:
> unexpected element name: expected=connectReturn,
> actual={urn:AccessManager}connectReturn
> at
> com.sun.xml.rpc.client.StreamingSender._handleRuntimeExceptionInSend(StreamingSender.java:248)
> at
> com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:230)
> at accessManager.IAccessManagerObj_Stub.connect(Unknown Source)
> at Client.main(Client.java:10)
> Caused by: unexpected element name: expected=connectReturn,
> actual={urn:AccessManager}connectReturn at
> accessManager.IAccessManagerObj_connect_connectRequest_connectResponse_ResponseStruct_SOAPSerializer.doDeserialize(Unknown
> Source)
> at
> com.sun.xml.rpc.encoding.ObjectSerializerBase.deserialize(ObjectSerializerBase.java:167)
> at
> com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.deserialize(ReferenceableSerializerImpl.java:134)
> at
> accessManager.IAccessManagerObj_Stub._deserialize_connect_connectRequest_connectResponse(Unknown
> Source)
> at
> accessManager.IAccessManagerObj_Stub._readFirstBodyElement(Unknown Source)
> at
> com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:158)
> ... 2 more
>
> if i add the -f:wsi switch, i get several warnings like:
>
> warning: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute
> not allowed in doc/lit or rpc/lit for soapbind:fault: "null"
>
> i've also added the -f:documentliteral switch, but it didn't seem to
> have any affect.
>
> any ideas?
>
> Brian L. Potter
> Software Scientist
> Solutions Group
> Intergraph Corporation (NASDAQ:INGR)
> 170 Graphics Drive, Madison, AL 35758
> P 1.256.730.8219 F 1.256.730.7514
> brian.potter_at_intergraph.com <mailto:brian.potter_at_intergraph.com>,
> www.intergraph.com
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net