SOAP request get changed

Hi,

I have an issue in calling JBOSS service from web Methods. From SOAP-UI i am sending a field like below.

But, JBOSS is receiving the request like below.

<tns:part id=“PART-237035DA0B” number=“5DA0B” xsi:nil=“true” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”/>

Web Methods is adding namespace. Don’t know why. Can any one let me know why web methods is adding the namespace?

The service is WSDL first provider service. The field in JBOSS WSDL is defined as nillable = “true”.

PS: WebMethods version = 9.5

Regards,
Jacob B

Hi Jacob,

please check if the WSDL has been correctly imported to webMethods, JBoss and SoapUI.

Is the namespace “tns” defined in the WSDL?
What is the setting of “elementFormQualified”?

Regards,
Holger

Hi Holger,

Yes the WSDL is successfully imported in webMethods.

Yes, the tns is defined in the WSDL.

xmlns:tns=“http://xxx
elementFormDefault=“qualified” targetNamespace=“http://xxx
version=“1.0”

I can see in the WSDL that elementFormDefault is set as qualified (as shown above)

Is this the reason that webMethods is adding the extra namespace for the field?

Can you please suggest on this.

Regards,
Jacob B

have you created the web service in earlier versions and migrated it to 9.5, or you created it in 9.5 itself?

Hi Sasank,

No. I have created the WSDL in 9.5 Version.

WebMethods is adding the namespace in the request.

Regards,
Jacob B

Hi Jacob,

yes, the setting elementFormQualified=“true” causes the prefix to be added to the Document fields upon creation of WSD.

Regards,
Holger

Hi Holger,

Where can i find elementFormQualified=“true” setting.

I can see the below in the WSDL file.

elementFormDefault=“qualified”. Are you referring to this or is there any property in webMethods?

Regards,
Jacob B

Hi Jacob,

exactly this setting in the WSDL.

Please check with the creator of the WSDL if this setting is neccessary or not.

Regards,
Holger

Hi Holger,

Thank you. :slight_smile:

Also, i have observed that in the WSDL, the field for which the nil namespace is getting added in webMethods call to JBOSS, nillable=“true”. The field type is complex type.

field definition in WSDL

<xs:complexType name=“BasePartType”>
xs:sequence
<xs:element maxOccurs=“unbounded”
minOccurs=“0” name=“part” nillable=“true” type=“tns:PartType” />
</xs:sequence>
<xs:attribute name=“number” type=“xs:string” />
<xs:attribute name=“name” type=“xs:string” />
</xs:complexType>
<xs:complexType name=“PartType”>
<xs:sequence />
<xs:attribute name=“id” type=“xs:ID” />
<xs:attribute name=“number” type=“xs:string” />
</xs:complexType>

request sent via SOAP UI

Request received in JBOSS

<tns:basePart name=“HARDWARE-ENG CONT” number=“123456” xmlns:tns=“http://XXX”>
<tns:part id=“PART-123456789” number=“123456” xsi:nil=“true” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”/>
</tns:basePart>

High lighted the namespace gettting added in the request sent to JBOSS.

When i remove nillable=“true” from the WSDL, the namspace for nil is not getting appending in the webMethods call to JBOSS.

Can you please provide your comments on this.

Regards,
Jacob B

Hi Jacob,

Can you explain your scenario/testcase a bit more in detail please?

Which WebService endpoint do you send the SoapUI-request to?
webMethods or JBoss directly?
When sending directly to JBoss, what is the result?
Can you try to put a TCP-Monitor in front of the JBoss and send the request (either SoapUI or webMethods) to the TCP-Monitor which will forward it to JBoss.

Are you using a pregenerated request in SoapUI or is this a custom build request?
SoapUI can create a sample SOAP-Request when the WSDL is imported in which all fields are flled with ‘?’.

Provide us the results and we will check.

Regards,
Holger

Hi Holger,

Below are the details.

Q: Can you explain your scenario/testcase a bit more in detail please?
A: I am testing the webmethods WSDL using SOAP UI. The service intern connects to JBOSS backend.

SOAP UI -> WM flow service -> JBOSS.

Q: Which WebService endpoint do you send the SoapUI-request to?
A: WebMethods

Q: When sending directly to JBoss, what is the result?
A: We are not getting any error as the data is passed as it is.

Q: Can you try to put a TCP-Monitor in front of the JBoss and send the request (either SoapUI or webMethods) to the TCP-Monitor which will forward it to JBoss.
A: As per present configuration, we could not do it.

Q: Are you using a pregenerated request in SoapUI or is this a custom build request?
SoapUI can create a sample SOAP-Request when the WSDL is imported in which all fields are flled with ‘?’.
A: Yes, I am using request default request created by SOAP UI and replacing the ? with actual values.

As per my analysis, when you specify the nillable attribute to complex type then the actual element in XML will be represent with namespace (xsi:nil=“true” xmlnssi=“http://www.w3.org/2001/XMLSchema-instance” ). Please see attachments.

So, webMethods is adding the namespace even if it is not specified in the request as the nillable property is set to true and it is the way we have to represent the element.

We have removed nillable property for the complex type in WSDL and regenerated the service and sent a request. Now the namespace is not getting added.

Issue occurred because JBOSS was not expecting the namspace in the request where as webMethods is sending it.

Regards,
Jacob B

Hi Holger,

Would it be possible for you to check the below subject and suggest please…

http://tech.forums.softwareag.com/techjforum/posts/list/55990.page#207179

The idea is to see the MTOM request received in webMethods.

Regards,
Jacob B

You said:
"We have removed nillable property for the complex type in WSDL and regenerated the service and sent a request. Now the namespace is not getting added. "

–> So your target JBOSS app is receiving what is expected now from wM or still an issue?

HTH,
RMG

Hi RMG,

Yes, JBOSS is now receiving what it is expecting. The issue is resolved.

Regards,
Jacob B

OK great…Just making sure the closing notes!

Hi Rmg,

Would it be possible for you to take a look at below post please. This is very important and urgent for me.

Any light on this is much appreciated.

http://tech.forums.softwareag.com/techjforum/posts/list/0/32381.page#207416

Regards,
Jacob B

Some one here will definitely respond to your query!

HTH,
RMG