Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: , +
I try to consume a web service within a new biztalk project. I clicked on “add generated items” and chose “Consume WCF Service” and MetaData files and XSD option but on last step i get the error:
“Error consuming WCF service metadata.Object reference not set to an instance of an object”.

I found target namespace is missing with <xsd schema=""> in wsdl and after adding i get the below error:

Error consuming WCF service metadata.Could not find a part of the path 'Message\Service References\service_camel_apache_org_cxf_jaxws_provider.xsd'


What I have tried:

WSDL File:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://tempservice.load.data.apache.org/cxf/jaxws/provider"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  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:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
  xmlns:ns1="http://cxf.component.camel.apache.org/"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:tns="http://tempservice.load.data.apache.org/cxf/jaxws/provider" >
  <wsdl:types>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://tempservice.load.data.apache.org/cxf/jaxws/provider">
      <xs:element name="LoadingInstructionsQuery">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Input">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="PID" type="xs:string"/>                 
                  <xs:element name="DateTimeStamp" type="xs:dateTime"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="LoadingInstructionsResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Output">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="MessageType">
                    <xs:complexType>
                      <xs:attribute name="Type" type="xs:string"/>                      
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="Header">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="Subject" type="xs:string"/>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="LoadingInstructionsItems">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element maxOccurs="unbounded" name="Item">
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="LoadingInstruction">
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element name="PID" type="xs:string"/>
                                    <xs:element name="Emaild" type="xs:string"/>                                    
                                  </xs:sequence>
                                </xs:complexType>
                              </xs:element>
                              <xs:element name="ItemDetails">
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="Item">
                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element name="Product" type="xs:string"/>
                                          <xs:element name="BLSplit">
                                            <xs:complexType>
                                              <xs:sequence>
                                                <xs:element maxOccurs="unbounded" name="Item">
                                                  <xs:complexType>
                                                    <xs:sequence>
                                                      <xs:element name="BLNumber" type="xs:string"/>
                                                    </xs:sequence>
                                                  </xs:complexType>
                                                </xs:element>
                                              </xs:sequence>
                                            </xs:complexType>
                                          </xs:element>
                                        </xs:sequence>
                                      </xs:complexType>
                                    </xs:element>
                                  </xs:sequence>
                                </xs:complexType>
                              </xs:element>
                              <xs:element name="AdditionalFields">
                                <xs:complexType>
                                  <xs:sequence>
                                    <xs:element minOccurs="0" maxOccurs="unbounded" name="Item">
                                      <xs:complexType>
                                        <xs:sequence>
                                          <xs:element name="Field" type="xs:string"/>
                                          <xs:element name="Value" type="xs:string"/>
                                        </xs:sequence>
                                      </xs:complexType>
                                    </xs:element>
                                  </xs:sequence>
                                </xs:complexType>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="invokeResponse">
    <wsdl:part name="invokeResponse" element="LoadingInstructionsResponse">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="invoke">
    <wsdl:part name="invoke" element="LoadingInstructionsQuery">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="DefaultPayloadProviderSEI">
    <wsdl:operation name="invoke">
      <wsdl:input name="invoke" message="tns:invoke">
      </wsdl:input>
      <wsdl:output name="invokeResponse" message="tns:invokeResponse">
      </wsdl:output>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="DefaultPayloadProviderSEIServiceSoapBinding" type="tns:DefaultPayloadProviderSEI">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="invoke">
      <soap:operation soapAction="" style="document"/>
      <wsdl:input name="invoke">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="invokeResponse">
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="service">
    <wsdl:port name="port" binding="tns:DefaultPayloadProviderSEIServiceSoapBinding">
      <soap:address location="https:testLoadMessage.hana.ondemand.com:443/LIns"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
Posted
Updated 12-Jan-23 1:27am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900