on 11-06-2013 4:51 PM
Hi experts
I´m trying to do the exercise in blog http://scn.sap.com/people/yatsea.li/blog/2012/01/09/creating-web-services-with-b1if-and-consuming-by...
I´m using NetDrive and the Exchanger XML Editor
When I generate the XSD files everything is ok, I do the changes in the namespaces and the XML validation it´s ok
GetDocList_in.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://tempuri.org/" elementFormDefault="qualified" attributeFormDefault="unqualified" ns0:force="Schema-irrelevant dummy attribute artifact to enforce the injection of the used namespace declaration!" targetNamespace="http://tempuri.org/">
<xs:element name="GetDocList" type="ns0:GetDocListType">
<xs:annotation xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms">
<xs:documentation>Root element for the document</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" name="GetDocListType">
<xs:annotation>
<xs:documentation>Automatically generated complex type comprising the whole document for the purpose of schema re-use</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="TableName" form="qualified" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
GetDocList_out.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://tempuri.org/" elementFormDefault="qualified" attributeFormDefault="unqualified" ns0:force="Schema-irrelevant dummy attribute artifact to enforce the injection of the used namespace declaration!" targetNamespace="http://tempuri.org/">
<xs:element name="GetDocsListResponse" type="ns0:GetDocsListResponseType">
<xs:annotation xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms">
<xs:documentation>Root element for the document</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" name="GetDocsListResponseType">
<xs:annotation>
<xs:documentation>Automatically generated complex type comprising the whole document for the purpose of schema re-use</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="GetDocListResult" form="qualified">
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:documentation>As the element 'GetDocListResult' contains multiple child-elements with the same name, it is assumed that it contains a database-table dump with similar rows. Thus, only one of those multiple elements with the biggest sub-element count has been dumped to this schema, assuming to be the superset of such a row, allowing a cardinality from zero til unbounded, making all of the sub-elements optional. Note that it is necessary for this approach being accurate that at least one of those rows has to contain the maximum number of fields; also, disjunct or order-reversed field-lists amongst rows also lead to inaccuracy. Also note that potentially otherl sub-elements with distinct names have been left out of the generated schema, as rows have to look homogeneous!</xs:documentation>
</xs:annotation>
<xs:element name="row" form="qualified" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="DocEntry" form="qualified" minOccurs="0" type="xs:string"/>
<xs:element name="CardCode" form="qualified" minOccurs="0" type="xs:string"/>
<xs:element name="CardName" form="qualified" minOccurs="0" type="xs:string"/>
<xs:element name="DocTotal" form="qualified" minOccurs="0" type="xs:string"/>
<xs:element name="DocDate" form="qualified" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
When I generate the WSDL definition and open with Exchanger XML Editor give me the next errors:
Here is my WSDL file:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:nspf1="http://tempuri.org/" xmlns:nspf2="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="urn:ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc" name="ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc" tns:force="" http:force="" soap:force="" xsd:force="" nspf1:force_nspf1="" nspf2:force_nspf2="">
<wsdl:documentation>WSDL interface-definition generated by B1iP for the IPO-Step + port 'ipostep:/vP.0010000104.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc#Ip'. If your development tool of choice rejects to use this generated WSDL-file, please do remove the various artificial attributes 'xxx:force...' out of the root-element 'wsdl:definitions'. These attributes do not comply to the WSDL 1.1 specification, but are an unavoidable generation-artefact!</wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://tempuri.org/" elementFormDefault="qualified" attributeFormDefault="unqualified" ns0:force="Schema-irrelevant dummy attribute artifact to enforce the injection of the used namespace declaration!" targetNamespace="http://tempuri.org/">
<xs:element name="GetDocList" type="defaultNs:GetDocListType">
<xs:annotation xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms">
<xs:documentation>Root element for the document</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" name="GetDocListType">
<xs:annotation>
<xs:documentation>Automatically generated complex type comprising the whole document for the purpose of schema re-use</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="TableName" form="qualified" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://tempuri.org/" elementFormDefault="qualified" attributeFormDefault="unqualified" ns0:force="Schema-irrelevant dummy attribute artifact to enforce the injection of the used namespace declaration!" targetNamespace="http://tempuri.org/">
<xs:element name="GetDocsListResponse" type="defaultNs:GetDocsListResponseType">
<xs:annotation xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms">
<xs:documentation>Root element for the document</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" name="GetDocsListResponseType">
<xs:annotation>
<xs:documentation>Automatically generated complex type comprising the whole document for the purpose of schema re-use</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="GetDocListResult" form="qualified">
<xs:complexType>
<xs:sequence>
<xs:annotation>
<xs:documentation>As the element 'GetDocListResult' contains multiple child-elements with the same name, it is assumed that it contains a database-table dump with similar rows. Thus, only one of those multiple elements with the biggest sub-element count has been dumped to this schema, assuming to be the superset of such a row, allowing a cardinality from zero til unbounded, making all of the sub-elements optional. Note that it is necessary for this approach being accurate that at least one of those rows has to contain the maximum number of fields; also, disjunct or order-reversed field-lists amongst rows also lead to inaccuracy. Also note that potentially otherl sub-elements with distinct names have been left out of the generated schema, as rows have to look homogeneous!</xs:documentation>
</xs:annotation>
<xs:element name="row" form="qualified" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="DocEntry" form="qualified" minOccurs="0" type="xs:string"/>
<xs:element name="CardCode" form="qualified" minOccurs="0" type="xs:string"/>
<xs:element name="CardName" form="qualified" minOccurs="0" type="xs:string"/>
<xs:element name="DocTotal" form="qualified" minOccurs="0" type="xs:string"/>
<xs:element name="DocDate" form="qualified" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="GetDocList">
<wsdl:part name="body" element="nspf1:GetDocList"/>
</wsdl:message>
<wsdl:message name="GetDocsListResponse">
<wsdl:part name="body" element="nspf2:GetDocsListResponse"/>
</wsdl:message>
<wsdl:portType name="ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc">
<wsdl:operation name="SYS.GetDocList">
<wsdl:input message="tns:GetDocList"/>
<wsdl:output message="tns:GetDocsListResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding" type="tns:ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SYS.GetDocList">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_Service">
<wsdl:port name="ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding_HTTP" binding="tns:ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding">
<soap:address location="http://agamtz007.daifonaga.local:8080/B1iXcellerator/exec/soap/vP.0010000104.in_WCSX/com.sap.b1i.vpl..."/>
</wsdl:port>
<wsdl:port name="ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding_HTTPS" binding="tns:ipostep_vP.0010000104.in_WCSX_com.sap.b1i.vplatform.runtime_INB_WS_CALL_SYNC_XPT_INB_WS_CALL_SYNC_XPT.ipo_proc_SoapBinding">
<soap:address location="https://agamtz007.daifonaga.local:8443/B1iXcellerator/exec/soap/vP.0010000104.in_WCSX/com.sap.b1i.vp..."/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
When I trying to do the reference in a .net project give me the next error:
There is something wrong with my XSD and WSDL generation??
Regards
Alvaro González
has una cosa, genera el wsdl, y copia todo el codigo del wsdl, guardalo en un archivo.wsdl, y agregalo como referencia pero adjuntalo al proyecto, prueba el wsdl con una herramienta que se llama SOAPUI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Leonardo Hernández
Con la última prueba que mencionas funcionó correctamente, guardé el contenido de la página en un archivo wsdl, lo agregué como referencia al Visual Studio y ya pude trabajar con mi WebService desde B1if
Gracias!
Alvaro González
Modifica el wsdl en esta parte
<soap:address location="http://agamtz007.daifonaga.local:8080/B1iXcellerator/exec/soap/vP.0010000104.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc"/>
<soap:address location="https://agamtz007.daifonaga.local:8443/B1iXcellerator/exec/soap/vP.0010000104.in_WCSX/com.sap.b1i.vplatform.runtime/INB_WS_CALL_SYNC_XPT/INB_WS_CALL_SYNC_XPT.ipo/proc"/>
borra el .daifonaga.local en ambos, y carga el wsdl, me avisas si funciona ,
aparte verifica si los puertos donde tienes el servidor de integracion estan abiertos, son el 8443 y el 8080
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola
Gracias por tu respuesta!
Intenté realizar lo que me indicaste, volví a generar los XSD, cambie el namespace y volví a generar el WSDL quitando el daifonaga.local y cuando agrego la referencia del servicio web al proyecto me solicita el usuario del B1iadmin pero al último me envía la siguiente pantalla
Ya no me envía el error, pero como no son visibles los métodos del archivo wsdl
También intenté cambiar el nombre del equipo por la IP, pero obtuve el mismo resultado
Porqué crees que suceda ésto?
Gracias!
Alvaro González
Hola Leonardo Hernández
Sí, he revisado las configuraciones que mencionas y todo parece estar correcto.
En los XSD y en el WSDL ya no aparece la entrada defaultNs
Saludos
Alvaro González
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.