|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Invalid WSDL generated from message set |
« View previous topic :: View next topic » |
Author |
Message
|
ashritha |
Posted: Thu Dec 02, 2010 2:08 pm Post subject: Invalid WSDL generated from message set |
|
|
Voyager
Joined: 25 Jul 2005 Posts: 85
|
Hi,
I am trying to develop a message flow that will be exposed as a webservice. I have my request and response XSD. These are the steps i followed to build the service
Message set:
1. imported the request and response XSDs into the message set project.
2. Created mxsd files for both request and response XSDs
3. Created Category file with input/output bodies.
4. Generated WSDL from the category file(both regular WSDL and deployable WSDL)
Message flow:
1.Used SOAPInput node, SOAPExtract Node, Compute Node and a SOAPReply node.
2. Dragged and dropped the deployable WSDL onto the SOAPInput node.
The message flow and message set are deployed on LINUX server
The flow works perfectly fine. I used SOAPUI to test the flow. I could import the WSDL that was generated in my message set(not the deployable WSDL but the regular one). I was able to post the requests and see the responses.
However, when i gave the WSDL to the consumer of the service, he wasnt able to use the WSDL as it was giving namespace errors. I tried validating the WSDL using XMLSPY and got the same error. The WSDL could not identify the request XSD on the schemaloaction specified.
Here is the WSDL file
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns="http://www.openapplications.org/oagis/9" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://tempuri.org/PRO_MSG_MF_PRO" xmlns:tns2="https://www.com.eai.materialmaster" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PRO_MSG_MF_PRO" targetNamespace="http://tempuri.org/PRO_MSG_MF_PRO">
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/PRO_MSG_MF_PRO" xmlns:mrm="http://tempuri.org/PRO_MSG_MF_PRO">
<xsd:import namespace="http://www.openapplications.org/oagis/9" schemaLocation="org/openapplications/www/oagis/_9/GetItemMaster.xsd"/>
<xsd:import namespace="https://www.com.eai.materialmaster" schemaLocation="materialmaster/eai/com/www/Material_Request.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="Pro_Cate_in">
<wsdl:part name="Material_Request" element="tns2:Material_Request"/>
</wsdl:message>
<wsdl:message name="Pro_Cate_out">
<wsdl:part name="ItemMasterHeader" element="ItemMasterHeader"/>
</wsdl:message>
<wsdl:portType name="PRO_MSG_MF_PROPortType">
<wsdl:operation name="Pro_Cate">
<wsdl:input name="Pro_Cate_Material_Request" message="tns:Pro_Cate_in"/>
<wsdl:output name="Pro_Cate_ItemMasterHeader" message="tns:Pro_Cate_out"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PRO_MSG_MF_PROSOAP_HTTP_Binding" type="tns:PRO_MSG_MF_PROPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="Pro_Cate">
<soap:operation soapAction=""/>
<wsdl:input name="Pro_Cate_Material_Request">
<soap:body parts="Material_Request" use="literal"/>
</wsdl:input>
<wsdl:output name="Pro_Cate_ItemMasterHeader">
<soap:body parts="ItemMasterHeader" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PRO_MSG_MF_PROSOAP_HTTP_Service">
<wsdl:port name="SOAP_HTTP_Port" binding="tns:PRO_MSG_MF_PROSOAP_HTTP_Binding">
<soap:address location="http://ussp-mbsd01.sjm.com:7800/MaterialMaster"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
And below is the error that i am receiving when i try to validate the WSDL in XMLSPY
"File C:\Documents and Settings\munvaa01\Desktop\PRO_MSG_MF_PROService.wsdl is not valid.
attribute 'element' in message part 'Material_Request' (message 'Pro_Cate_in') refers to element 'tns2:Material_Request' which is not defined within the WSDL file!
Error location: wsdl:definitions / wsdl:message / wsdl:part / @element"
Is there something that i am missing? Any help is greatly appreciated.
Thanks. |
|
Back to top |
|
 |
nukalas2010 |
Posted: Thu Dec 02, 2010 8:12 pm Post subject: |
|
|
 Master
Joined: 04 Oct 2010 Posts: 220 Location: Somewhere in the World....
|
Hi,
I have the same requirement to expose the message flow as webservice...
I have the XSD's for Request and Response..
I created the Message Definitions by using these XSD's and generate WSDL file from these..
Now, Again I had created the Message Definition file from WSDL file(which is genreated previosuly)
Now I drag and drop this Deployable WSDL file to the Canvas...
then it automatically create Nodes SoapInput Node, Operations SubFlow, and SoapReply Node (we need to modify this flow how we want)
That SoapInputNode will hav all the properties automatically generated...
If still problem with that WSDL then please check the XSD's which u are using...
If my understanding is incorrect please let me know |
|
Back to top |
|
 |
nimisha.parihar |
Posted: Thu Dec 02, 2010 9:06 pm Post subject: |
|
|
Apprentice
Joined: 03 Nov 2010 Posts: 41
|
Guys,
I had a smiliar requirement of exposing my message flow as a web service.
If the client is not particular about using SOAP we can try using HTTP Input and HTTP Reply nodes to achieve this.
Only benefit is - we dont need a WSDL  |
|
Back to top |
|
 |
harish_td |
Posted: Thu Dec 02, 2010 9:32 pm Post subject: Re: Invalid WSDL generated from message set |
|
|
Master
Joined: 13 Feb 2006 Posts: 236
|
ashritha wrote: |
And below is the error that i am receiving when i try to validate the WSDL in XMLSPY
"File C:\Documents and Settings\munvaa01\Desktop\PRO_MSG_MF_PROService.wsdl is not valid.
attribute 'element' in message part 'Material_Request' (message 'Pro_Cate_in') refers to element 'tns2:Material_Request' which is not defined within the WSDL file!
Error location: wsdl:definitions / wsdl:message / wsdl:part / @element"
|
Open your WSDL in XMLSPY from a location where the below directory structure exists
Code: |
<xsd:import namespace="http://www.openapplications.org/oagis/9" schemaLocation="org/openapplications/www/oagis/_9/GetItemMaster.xsd"/>
<xsd:import namespace="https://www.com.eai.materialmaster" schemaLocation="materialmaster/eai/com/www/Material_Request.xsd"/>
|
At the time of generating your message set, the toolkit knew where to find your XSD documents as required by the import statement.
Pay special attention to the lines in the deployable WSDL having the below format
Code: |
<generatedMXSD location="..\..\..\getFooBar_InlineSchema1.mxsd"/> |
This is how the toolkit knows how to link the schema definition to the WSDL document.
If you want to share the WSDL with the connecting applications, you also need to share with them the supporting XSD's. Just the WSDL would not do. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|