Web Service Reference - Namespace Issue

Web Service Reference - Namespace Issue

  
Hi OS community,

I am writing here, once you may be able to help me on an issue that I am facing.

I just deployed a web service that is running in JBoss 6.1.0 in order to call it via the OutSystems platform. Everything runs smoothly until I try to call the web service, once it doesn't return anything (the message is empty - but from the AS log I just can see that there is a success response).

After trying to simulate it using SOAP UI and twicking the response in terms of namespaces I just figured out that if the response has no namespacess associated then it works perfectly in the OutSystems platform ans the return message is correctly mapped.

This is a strange behavior once the structures with the Web Service reference are pointing to the correct OriginalNamespace, the one that JBoss is replying with.

So, my question is, does OS works with namespaces within the return message (using Web Services)?

I am using OS 7.0.1.7.

Thanks,

Ricardo Ribeiro
Hi,

I just uploaded to version 7.0.1.18 and experience the same behavior, so I believe that this is not a version issue.

Thanks,

Ricardo Ribeiro
Hi Ricardo,

What type of webservice are you creating?
From the problem description it feels like they are  Rpc encoded. That is currently deprecated by the underlying webservice framework (jax-ws).

Can you check if you are using rpc encoded, rpc literal or document literal? You can check that in the wsdl.

Regards,
João Rosado
Hi João,

Actually that is correct! The webservice generated (by a third-party tool) is rpc (from wsdl - "<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>").

I will check with that third-party tool, if it's possible to generate a jax-ws encoded webservice.

But, to use this rpc encoded webservice, is that possible to put it to work AS-IS?

Thanks,

Ricardo Ribeiro
Hi Ricardo,

There are 2 types of rpc: encoded and literal.
In the wsdl will be like
<soap:body use="encoded"
or
<soap:body use="literal"

The literal one works. The encoded won't work with the platform webreferences, so I recommend trying to expose a webservice with a more recent interface if possible.
If changing, I recommend going for "document literal".

Also if you are using axis (the only implementation that I seen that still supports rpc encoded), I would recommend you reading about jax-ws or cxf. Axis is kinda old and should not be used to do new stuff unless you got a good reason to.

That said, if you really need to integrate with it you can do it in a extension using Integration studio. It's not easy because some versions of axis dependencies are known to cause problems in jboss if you include them in the extension. So keep that in mind if it gives some strange problems after.
I would try to avoid this option if possible.

Regards,
João Rosado
Hi João,

Thanks again for the quick reply. Actually the service is rpc literal, so from what you're saying it should work right?

Are there any known issues/concerns within OutSystems with this type of web services?

Thanks,

Ricardo Ribeiro
Not that I know of.

Can you post the wsdl?
And what platform version/kind you got installed?

Regards,
João Rosado
João Rosado wrote:
Not that I know of.

Can you post the wsdl?
And what platform version/kind you got installed?

Regards,
João Rosado
 Hi João,

I am using OS 7.0.1.18 and the server which is hosting the web service is JBoss 6.1.

The wsdl was generated out-of-the-box by a third party tool, that's why I am not so keen on changing that.

In attach there's the WSDL, the XSD and also the response from the server which is not being processed by the OS Platform.

Thank you very much.

Ricardo Ribeiro
 
Hi Ricardo,

From what I can see that response actually looks wrong for that wsdl.

First problem is that on the RR.xsd there is no "elementFormDefault" attribute defined, so its as if it was set to "unqualified" ( http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-schema )
But that response is incorrectly behaving like it was elementFormDefault="qualified". This justifies all those "tns:" namespaces.

...Second problem (that I have no idea why on how to even trick fix) is the namepace of the "return"
The Rpc specification implies that the "part" elements are always unqualified (meaning they cannot have a namespace). But in your response it has one!
<return xmlns="http://www.example.org/Retail"

Regards,
João Rosado
Hi João,

Thanks a lot for the quick reply.

Actually I was just testing the response using SOAP UI now adding the schema validation, which replied that has failed! So I was focusing on the wrong issue here. The problem is really in the schema, not in the wsdl.

So your answer just confirmed my last results, the xsd is not ok.

Regarding the  part element, I will just have to think a little bit about it, but maybe I can change it if I change the xsd.

Thanks a lot.

Regards,

Ricardo Ribeiro