views:

315

answers:

2

Hi there, I'm running jboss-4.2.1.GA to generate WS requests.

I have created the WS client with the help of JWSDP-2.0/JAXRPC. I have deployed the client to Jboss and I am now trying to send requests.

When I try to initialise the client service: javax.xml.rpc.Service service = servicefactory.createService(new URL(wsdlURL), serviceQN), Jboss starts to complain.

The error that Jboss generates is:

ERROR [JBossXSErrorHandler] JBossWS_targetnamespace1.com7796329154971783225.xsd[domain:http://www.w3.org/TR/xml-schema-1]::[key=src-resolve.4.2]::Message=src-resolve.4.2: Error resolving component 'tns2:SimpleSerialiser'. It was detected that 'tns2:SimpleSerialiser' is in namespace 'http://targetnamespace2.com', but components from this namespace are not referenceable from schema document 'file:/home/jbossPath/jboss-4.2.1.GA/server/default/tmp/jbossws/JBossWS_targetnamespace1.com7796329154971783225.xsd'. If this is the incorrect namespace, perhaps the prefix of 'tns2:SimpleSerialiser' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/home/jbossPath/mobaq/jboss-4.2.1.GA/server/default/tmp/jbossws/JBossWS_targetnamespace1.com7796329154971783225.xsd'.

Followed by a warning:

WARN [WSDL11Reader] Encoding style 'http://schemas.xmlsoap.org/soap/encoding/' not supported for: {urn:namespace}doTask

Finally, the following error is displayed:

ERROR [STDERR] org.jboss.ws.WSException: Cannot obtain java type mapping for: {urn:namespace}ArrayOf_tns2_TagType ERROR [STDERR] at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildInputParameter(JAXRPCMetaDataBuilder.java:266) ... ...

I know that a similar error has been posted in community.jboss.org in the past but for a different task. I am not sure if the patch provided will solve my issue and I don't know how to implement the patch provided.

In addition to this, I have found someone having similar issues: JAX-RPC in JBoss 4.2.3 but the suggested solution does not work for me.

I also know that JbossWS does not support RPC/Encoded but I use jboss for my solution. Is there a way for me to get around this issue, can I not get Jboss to create the client service to send requests? I'm not sure requesting a RPC/Literal WSDL file is a possibility so that's why I am asking.

Any suggestions will be greatly appreciated.

+1  A: 

http://schemas.xmlsoap.org/soap/encoding/ is a legacy style used by very old web service stacks (it's so bad, even Microsoft recommend against it). It was seriously flawed, and so was excluded from the WS-I interoperability spec, which most modern Java web service stacks implement.

The only java stack that I know of that handles these old encoding is Axis 1, which is itself seriously flawed, but may be your only option. You should be able to run Axis as a client from inside JBoss.

skaffman
Thanks, I'll try the suggested solution just now. Cheers.
Lucas T
A: 

I finally solved the issue by implementing the solution suggested from JAX-RPC in JBoss 4.2.3 post:

To jump to the chase, I simply put the following JARs from Axis 1.4 in my EAR's lib directory: axis.jar, axit-ant.jar, commons-discovery-0.2.jar, jaxrpc.jar, saaj.jar, wsdl4j-1.5.1.jar

What I was doing was putting the above jars with my own WS Client jar file and that's why it didn't work. The solution was there, in front of me in black and white and I didn't implement it properly. That's the problem when looking too closely to an issue for too long.

I am a numpty.

Lucas T