on 01-04-2010 11:24 AM
Dear Experts,
When i tried to consume a .NET webservice.
The Response is given like this.
Response
-
Result
-
Schema
Whether there is any way to access the schema in .NET, through web dynpro Java.
Or we need to rewrite the web service as such, the output fields needs to be given in the Result like this
Response
-
Result
-
EMP No
-
EMP Name
Please help me in this regard.
Thanks & Regards,
Palani
Hi Palani
In general any standard web-service can be consumed in Java. What is the Schema parameter type?
BR, Siarhei
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Siarhei,
Schema is a Data Set that is defined in .NET
I tried to print the Schema Type, after the execution in Webdynpro
Value of Schema
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="VENDORNUMBER" type="xs:string" minOccurs="0"/>
<xs:element name="CURRENCYCODE" type="xs:string" minOccurs="0"/>
<xs:element name="MATERIALNUMBER" type="xs:string" minOccurs="0"/>
<xs:element name="SHORTTEXT" type="xs:string" minOccurs="0"/>
<xs:element name="ORDERUNIT" type="xs:string" minOccurs="0"/>
<xs:element name="NETPRICE" type="xs:decimal" minOccurs="0"/>
<xs:element name="PRICEUNIT" type="xs:unsignedByte" minOccurs="0"/>
<xs:element name="MATERIALGROUP" type="xs:string" minOccurs="0"/>
<xs:element name="DELIVERYTIME" type="xs:unsignedByte" minOccurs="0"/>
<xs:element name="GLACCOUNT" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
I am not able to see the output in the schema, when i try to execute the webservice from Webdynpro.
When I executed the webservice sepearately, i am able to get the data.
http://XXX/ws/service.asmx?op=GetMaterialInfo
Input parameter are defined here and when i invoke the web service
<?xml version="1.0" encoding="utf-8" ?>
- <DataSet xmlns="Wartsila.PTIP.WebServices.CatalogueServices">
- <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="Table">
- <xs:complexType>
- <xs:sequence>
<xs:element name="VENDORNUMBER" type="xs:string" minOccurs="0" />
<xs:element name="CURRENCYCODE" type="xs:string" minOccurs="0" />
<xs:element name="MATERIALNUMBER" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
- <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
- <NewDataSet xmlns="">
- <Table diffgr:id="Table1" msdata:rowOrder="0">
<VENDORNUMBER>3852</VENDORNUMBER>
<CURRENCYCODE>EUR</CURRENCYCODE>
<SHORTTEXT>Bermuda Shorts</SHORTTEXT>
</Table>
- <Table diffgr:id="Table2" msdata:rowOrder="1">
<VENDORNUMBER>3852</VENDORNUMBER>
<CURRENCYCODE>EUR</CURRENCYCODE>
<SHORTTEXT>Sun Lotion</SHORTTEXT>
</Table>
</NewDataSet>
</diffgr:diffgram>
</DataSet>
Please let me know, hw to get the values in webdynpro java.
Thanks & Regards,
Palani
Edited by: Palaniappan A on Jan 4, 2010 1:51 PM
Edited by: Palaniappan A on Jan 4, 2010 1:52 PM
Edited by: Palaniappan A on Jan 4, 2010 1:53 PM
Hi,
Schema is of type, java.lang.object and the cardinality of that node is set to 0 to 1.
How to read the schema?
when i tried to print the schema, i am getting only the structure of the Schema and not the output.
The structures of the schema is
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"> - <xs:complexType> - <xs:choice minOccurs="0" maxOccurs="unbounded"> - <xs:element name="Table"> - <xs:complexType> - <xs:sequence> <xs:element name="VENDORNUMBER" type="xs:string" minOccurs="0" /> <xs:element name="CURRENCYCODE" type="xs:string" minOccurs="0" /> <xs:element name="MATERIALNUMBER" type="xs:string" minOccurs="0" /> <xs:element name="SHORTTEXT" type="xs:string" minOccurs="0" /> <xs:element name="ORDERUNIT" type="xs:string" minOccurs="0" /> <xs:element name="NETPRICE" type="xs:decimal" minOccurs="0" /> <xs:element name="PRICEUNIT" type="xs:unsignedByte" minOccurs="0" /> <xs:element name="MATERIALGROUP" type="xs:string" minOccurs="0" /> <xs:element name="DELIVERYTIME" type="xs:unsignedByte" minOccurs="0" /> <xs:element name="GLACCOUNT" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
Regards,
Palani
It seems that the Schema parameter has custom type definition declared in WSDL of the web-service. You can get the WSDL and check the Schema type exactly.
Anyway try to Import the web-service as WebDynpro model. WebDynpro will try to generate Java classes for all the web-service types. I think that everything should work.
BR, Siarhei
Hi,
Please let me know, how we need to have the web service structure for a data set in .NET, for web dynnpro.
My present structure is like this in webdynpro, i have used the Request_ServiceHTTPGet_GetMaterialInfo, to get the output from the web service
WS_Catalogue
-
Request_ServiceHTTPGet_GetMaterialInfo
-
Response (REsponse_ServiceHttpGet_GetMaterialInfo)
-
Response_Service_HttpGet_getMaterialInfo
-
Result (ComplexType_DataSet)
-
ComplexType_DataSet
-
_any
-
schema
-
MatDesc
-
MatNo
-
Request_ServiceHTTPPost_GetMaterialInfo
-
Request_ServiceHTTPSOAP_GetMaterialInfo
-
Response_ServiceHTTPGet_GetMaterialInfo
-
Response_ServiceHTTPPost_GetMaterialInfo
-
Response_ServiceHTTPSOAP_GetMaterialInfo
-
ComplexType_DataSet
-
ComplexType_GetMaterialInfoResult
This is my code that is been used for execution of webdynpro
Request_ServiceSoap_getMaterialInfo catalogue_SOAPReq = new Request_ServiceSoap_getMaterialInfo(); wdContext.nodeRequest_ServiceSoap_getMaterialInfo().bind(catalogue_SOAPReq); catalogue_SOAPReq.setMaterialDescription(wdContext.currentVn_CatalogueInputElement().getVa_MaterialDesc()); catalogue_SOAPReq.setMaterialNumber(wdContext.currentVn_CatalogueInputElement().getVa_MaterialNo()); wdContext.currentRequest_ServiceSoap_getMaterialInfoElement().modelObject().execute(); wdComponentAPI.getMessageManager().reportSuccess("Data"+wdContext.nodeSOAP_Result().size()); wdComponentAPI.getMessageManager().reportSuccess("After WS Execution"+wdContext.currentSOAP_ResultElement().getSchema ()); WDCopyService.copyElements(wdContext.nodeSOAP_Result(),wdContext.nodeSOAPResult_1()); wdComponentAPI.getMessageManager().reportSuccess("SOAP Result"+wdContext.currentSOAPResult_1Element().getSchema ());
Please let me know, any changes has to be done in the Web service to get it executed.
Thanks in advance
Regards,
Palani
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.