Error Publishing after adding WS SAP reference

Error Publishing after adding WS SAP reference

  
hi,
 
I'm trying to publish an OML with a webservice reference to SAP. But without success. At the end of the publication I get the following error:

Invalid Web Reference
The WS_Broker_Reference_Get_Art web reference could not be imported because it is not supported.
Exception Details:
[1] Invalid Web Reference: The WS_Broker_Reference_Get_Art web reference could not be imported because it is not supported.
at #lo.#Du.#wA(TextWriter writer)
  at OutSystems.HubEdition.Compiler.Espace.#OE()
  at OutSystems.HubEdition.Compiler.Espace.Dump()
  at #lo.#2o.#9y()
  at #lo.#2o.#bz(String[] args)
  at #lo.#2o.#3b(String[] args)
[2] Id : ParameterNotFound
Type : Error
Message : Internal Error
Detail : Could not find 'IReference' parameter.
HelpRef : 2063
ExtraInfo : Exception Details:
[1] Internal Error: Could not find 'IReference' parameter.
at #lo.#Bu.#c0(TextWriter writer, String methodName, String parameterName, String originalName)
  at #lo.#Eu.#h1(TextWriter writer)
  at #lo.#Eu.Dump(TextWriter writer)
  at #lo.#Du.#wA(TextWriter writer)
  at OutSystems.HubEdition.Compiler.Espace.#OE()
  at OutSystems.HubEdition.Compiler.Espace.Dump()
  at #lo.#2o.#9y()
  at #lo.#2o.#bz(String[] args)
  at #lo.#2o.#3b(String[] args)
Submitable : Yes





any ideas ?


thanks
i'm using 4.2  version
Hello Bruno,

When we have to use SAP WebServices we can find some problems because of the definition of the WSDLs and the compatibillity with the Outsystems Platform, even more in old versions as 4.2.
First of all you can use a software to validate your WSDL and check if there's something wrong with it.
Beside that you should check recursive structures and their definition, also in the WSDL because they also cause problems.
If you can't find and solve the problem, try to create an extension to call that WS and see if the problem is persistent or not (most of the times this works and you just have to develop a wrapper to be able to use each methods in your application).
Hope this tips could help...Good luck..

Best Regards,
Gonçalo Martins
thanks Gonçalo, 

i have tried this webservice on Outsystems Platform 7.0 and it works fine  :s

I want to "escape" the extensions because it will be created a lot of methods.

However already tried using "rafael" but i'm getting an error regarding in dll "librfc32.dll".


Best Regards,
BR
Hi Bruno,

There were many improvements on the latest versions to support more WSDL scenarios and bugfixes. Looks like you are hitting one of them.
From the stack the most I can see is that it is regarding a parameter ("Could not find 'IReference' parameter").

As for the librfc32.dll, the most common problem is that the IIS application pool needs to be configured in 32bits and the dll installed on machine (usually on the Windows/System32).

To get the application pool in 32bits go to the IIS Manager and in the application pool of your applications select "Advanced Settings" and "Enable 32-bit applications".
(Note this in IIS 7.5, not sure how to configure that on other IIS versions)

Regards,
João Rosado
I understand your problem because the extension will require more time and more methods.
If you tried it in the last version and it works, the problem might be in the WSDL and the interpretation of it in the old 4.2 version.
Without the WSDL I can't give more tips.
About the Rafael component, you should look carefully for the versions of the Visual Studio (2008 or 2010), the Windows version and also the architecture of your computer or target compilation options (x86 or 64) because of the error you are obtaining in the dll "librfc32.dll" which is the 32bits version for the SAP connector.
About this issue you can take a look at this post:

http://www.outsystems.com/NetworkForums/ViewTopic.aspx?TopicId=8047&Topic=SAP-VS2010-and-Windows-7-setup


Good luck..

Best Regards,
Gonçalo Martins
hi Gonçalo, 

this is the WSDL from WS:

 
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsoap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:n1="urn:sap-com:document:sap:rfc:functions">
  - <wsdl:documentation>
    <sidl:sidl xmlns:sidl="http://www.sap.com/2007/03/sidl" />
  </wsdl:documentation>
  <wsp:UsingPolicy wsdl:required="true" />
  - <wsp:Policy wsu:Id="BN_BN_WS_Broker_Reference_Get_Art_binding">
    <saptrnbnd:OptimizedXMLTransfer uri="http://xml.sap.com/2006/11/esi/esp/binxml" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" wsp:Optional="true" />
    <saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" wsp:Optional="true" />
    <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">false</sapattahnd:Enabled>
    - <wsp:ExactlyOne xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
      - <wsp:All>
        - <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
          - <wsp:Policy>
            - <sp:TransportToken>
              - <wsp:Policy>
                - <sp:HttpsToken>
                  - <wsp:Policy>
                    <sp:HttpBasicAuthentication />
                  </wsp:Policy>
                </sp:HttpsToken>
              </wsp:Policy>
            </sp:TransportToken>
            - <sp:AlgorithmSuite>
              - <wsp:Policy>
                <sp:Basic128Rsa15 />
              </wsp:Policy>
            </sp:AlgorithmSuite>
            - <sp:Layout>
              - <wsp:Policy>
                <sp:Strict />
              </wsp:Policy>
            </sp:Layout>
          </wsp:Policy>
        </sp:TransportBinding>
      </wsp:All>
    </wsp:ExactlyOne>
    <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true" />
  </wsp:Policy>
  - <wsp:Policy wsu:Id="BN_BN_WS_Broker_Reference_Get_Art_binding_SOAP12">
    <saptrnbnd:OptimizedXMLTransfer uri="http://xml.sap.com/2006/11/esi/esp/binxml" xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/" wsp:Optional="true" />
    <saptrnbnd:OptimizedMimeSerialization xmlns:saptrnbnd="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" wsp:Optional="true" />
    <sapattahnd:Enabled xmlns:sapattahnd="http://www.sap.com/710/features/attachment/">false</sapattahnd:Enabled>
    - <wsp:ExactlyOne xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
      - <wsp:All>
        - <sp:TransportBinding xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:sapsp="http://www.sap.com/webas/630/soap/features/security/policy" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/07/utility" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex">
          - <wsp:Policy>
            - <sp:TransportToken>
              - <wsp:Policy>
                - <sp:HttpsToken>
                  - <wsp:Policy>
                    <sp:HttpBasicAuthentication />
                  </wsp:Policy>
                </sp:HttpsToken>
              </wsp:Policy>
            </sp:TransportToken>
            - <sp:AlgorithmSuite>
              - <wsp:Policy>
                <sp:Basic128Rsa15 />
              </wsp:Policy>
            </sp:AlgorithmSuite>
            - <sp:Layout>
              - <wsp:Policy>
                <sp:Strict />
              </wsp:Policy>
            </sp:Layout>
          </wsp:Policy>
        </sp:TransportBinding>
      </wsp:All>
    </wsp:ExactlyOne>
    <wsaw:UsingAddressing xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" wsp:Optional="true" />
  </wsp:Policy>
  - <wsp:Policy wsu:Id="IF_IF_ZSD_WS_REFERENCE_GET_ART">
    - <sapsession:Session xmlns:sapsession="http://www.sap.com/webas/630/soap/features/session/">
      <sapsession:enableSession>false</sapsession:enableSession>
    </sapsession:Session>
    - <sapcentraladmin:CentralAdministration xmlns:sapcentraladmin="http://www.sap.com/webas/700/soap/features/CentralAdministration/" wsp:Optional="true">
      <sapcentraladmin:BusinessApplicationID>005056A300031ED1BCA07E26BA3CEC09</sapcentraladmin:BusinessApplicationID>
    </sapcentraladmin:CentralAdministration>
  </wsp:Policy>
  - <wsp:Policy wsu:Id="OP_IF_OP_ZsdfMdReferenceGetArt">
    <sapcomhnd:enableCommit xmlns:sapcomhnd="http://www.sap.com/NW05/soap/features/commit/">false</sapcomhnd:enableCommit>
    <sapblock:enableBlocking xmlns:sapblock="http://www.sap.com/NW05/soap/features/blocking/">true</sapblock:enableBlocking>
    <saptrhnw05:required xmlns:saptrhnw05="http://www.sap.com/NW05/soap/features/transaction/">no</saptrhnw05:required>
    <saprmnw05:enableWSRM xmlns:saprmnw05="http://www.sap.com/NW05/soap/features/wsrm/">false</saprmnw05:enableWSRM>
  </wsp:Policy>
  - <wsdl:types>
    - <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:soap:functions:mc-style" xmlns:n0="urn:sap-com:document:sap:rfc:functions">
      <xsd:import namespace="urn:sap-com:document:sap:rfc:functions" />
      - <xsd:simpleType name="char20">
        - <xsd:restriction base="xsd:string">
          <xsd:maxLength value="20" />
        </xsd:restriction>
      </xsd:simpleType>
      - <xsd:complexType name="ZsdsbrokerRef">
        - <xsd:sequence>
          <xsd:element name="Reference" type="tns:char20" />
        </xsd:sequence>
      </xsd:complexType>
      - <xsd:complexType name="ZsdsbrokerArt">
        - <xsd:sequence>
          <xsd:element name="CodArtigo" type="n0:char25" />
          <xsd:element name="CodCor" type="n0:char12" />
          <xsd:element name="Tam" type="n0:char12" />
        </xsd:sequence>
      </xsd:complexType>
      - <xsd:element name="ZsdfMdReferenceGetArt">
        - <xsd:complexType>
          - <xsd:sequence>
            <xsd:element name="IReference" type="tns:ZsdsbrokerRef" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
      - <xsd:element name="ZsdfMdReferenceGetArtResponse">
        - <xsd:complexType>
          - <xsd:sequence>
            <xsd:element name="EArtigo" type="tns:ZsdsbrokerArt" />
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    - <xsd:schema attributeFormDefault="qualified" targetNamespace="urn:sap-com:document:sap:rfc:functions">
      - <xsd:simpleType name="char12">
        - <xsd:restriction base="xsd:string">
          <xsd:maxLength value="12" />
        </xsd:restriction>
      </xsd:simpleType>
      - <xsd:simpleType name="char25">
        - <xsd:restriction base="xsd:string">
          <xsd:maxLength value="25" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:schema>
  </wsdl:types>
  - <wsdl:message name="ZsdfMdReferenceGetArt">
    <wsdl:part name="parameters" element="tns:ZsdfMdReferenceGetArt" />
  </wsdl:message>
  - <wsdl:message name="ZsdfMdReferenceGetArtResponse">
    <wsdl:part name="parameter" element="tns:ZsdfMdReferenceGetArtResponse" />
  </wsdl:message>
  - <wsdl:portType name="ZSD_WS_REFERENCE_GET_ART">
    - <wsp:Policy>
      <wsp:PolicyReference URI="#IF_IF_ZSD_WS_REFERENCE_GET_ART" />
    </wsp:Policy>
    - <wsdl:operation name="ZsdfMdReferenceGetArt">
      - <wsp:Policy>
        <wsp:PolicyReference URI="#OP_IF_OP_ZsdfMdReferenceGetArt" />
      </wsp:Policy>
      <wsdl:input message="tns:ZsdfMdReferenceGetArt" />
      <wsdl:output message="tns:ZsdfMdReferenceGetArtResponse" />
    </wsdl:operation>
  </wsdl:portType>
  - <wsdl:binding name="WS_Broker_Reference_Get_Art_binding" type="tns:ZSD_WS_REFERENCE_GET_ART">
    - <wsp:Policy>
      <wsp:PolicyReference URI="#BN_BN_WS_Broker_Reference_Get_Art_binding" />
    </wsp:Policy>
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <wsdl:operation name="ZsdfMdReferenceGetArt">
      <soap:operation soapAction="urn:sap-com:document:sap:soap:functions:mc-style:ZSD_WS_REFERENCE_GET_ART:ZsdfMdReferenceGetArtRequest" style="document" />
      - <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      - <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  - <wsdl:binding name="WS_Broker_Reference_Get_Art_binding_SOAP12" type="tns:ZSD_WS_REFERENCE_GET_ART">
    - <wsp:Policy>
      <wsp:PolicyReference URI="#BN_BN_WS_Broker_Reference_Get_Art_binding_SOAP12" />
    </wsp:Policy>
    <wsoap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
    - <wsdl:operation name="ZsdfMdReferenceGetArt">
      <wsoap12:operation soapAction="urn:sap-com:document:sap:soap:functions:mc-style:ZSD_WS_REFERENCE_GET_ART:ZsdfMdReferenceGetArtRequest" style="document" />
      + <wsdl:input>
        <wsoap12:body use="literal" />
      </wsdl:input>
      - <wsdl:output>
        <wsoap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  - <wsdl:service name="WS_Broker_Reference_Get_Art">
    - <wsdl:port name="WS_Broker_Reference_Get_Art_binding" binding="tns:WS_Broker_Reference_Get_Art_binding">
      <soap:address location="http://SRVERPDEV:8000/sap/bc/srt/rfc/sap/zsd_ws_reference_get_art/100/ws_broker_reference_get_art/ws_broker_reference_get_art_binding" />
    </wsdl:port>
    - <wsdl:port name="WS_Broker_Reference_Get_Art_binding_SOAP12" binding="tns:WS_Broker_Reference_Get_Art_binding_SOAP12">
      <wsoap12:address location="http://SRVERPDEV:8000/sap/bc/srt/rfc/sap/zsd_ws_reference_get_art/100/ws_broker_reference_get_art/ws_broker_reference_get_art_binding" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Best Regards, 
Bruno Rebelo
Hello Bruno,

I made
short analysis of the WSDL and the first thing that makes me suspect, according to the version of your Agile Plaform (4.2), is the definition of complex structures like ZsdfMdReferenceGetArtResponse where you have:

<xsd:element name="ZsdfMdReferenceGetArtResponse">
        - <xsd:complexType>
          - <xsd:sequence>
            <xsd:element name="EArtigo" type="tns:ZsdsbrokerArt" />
          </xsd:sequence>
        </xsd:complexType>
 </xsd:element>

Since this seems to be a problem related to the interpretation of the WSDL by the Platform version, I think you should contact the OutSystems Technical Support (support@outsystems.com) because they know exactly the differences between the engine that deals with WebServices in the different Platform versions.
The other approach you can take is to develop an extension with the wrapper for the methods, just like I told you before (this takes more time for sure..).
Hope this helps a little bit..Good luck and let me know about the next steps.

Best Regards,
Gonçalo Martins