Question

Both Visual Studio 2010 and 2012 give an opaque error when I try to import a PeopleSoft WSDL as a service reference.

I right-click on Service References, select Add Service Reference, paste the URL under Address, hit Go, then hit OK.

I get this opaque error:

Opaque error message from Visual Studio

http://xmlns.oracle.com/Enterprise/Tools/schemas doesn't appear to resolve to anything, but I'm almost certain that doesn't matter.

I've also tested this in soapUI on the same PC as Visual Studio, and everything works correctly there. I can access the SOAP service and get expected responses.

The opaqueness of the error message is confusing, and this works in soapUI, so the WSDL is presumptively good? I've searched on this error and haven't found anything so far.

Here's the WSDL (sanitized to obscure URLs and service details):

<?xml version="1.0"?>
<wsdl:definitions name="A_PROGRAM_SERVICE.1" targetNamespace="http://xmlns.oracle.com/Enterprise/HCM/schemas/A_PROGRAM_SERVICE.1" xmlns:A_PROGRAM_REQUEST_MSG.VERSION_1="http://xmlns.oracle.com/Enterprise/Tools/schemas" xmlns:A_PROGRAM_RESPONSE_MSG.VERSION_1="http://xmlns.oracle.com/Enterprise/Tools/schemas" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xmlns.oracle.com/Enterprise/HCM/schemas/A_PROGRAM_SERVICE.1" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy">
  <wsp:UsagePolicy wsdl:Required="true"/>
  <plnk:partnerLinkType name="A_PROGRAM_SERVICE_PartnerLinkType">
    <plnk:role name="A_PROGRAM_SERVICE_Provider">
      <plnk:portType name="tns:A_PROGRAM_SERVICE_PortType"/>
    </plnk:role>
  </plnk:partnerLinkType>
  <wsdl:types>
    <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:import namespace="http://xmlns.oracle.com/Enterprise/Tools/schemas" schemaLocation="A_PROGRAM_REQUEST_MSG.VERSION_1.xsd"/>
      <xsd:import namespace="http://xmlns.oracle.com/Enterprise/Tools/schemas" schemaLocation="A_PROGRAM_RESPONSE_MSG.VERSION_1.xsd"/>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="A_PROGRAM_REQUEST_MSG.VERSION_1">
    <wsdl:documentation>A Data Repository</wsdl:documentation>
    <wsdl:part element="A_PROGRAM_REQUEST_MSG.VERSION_1:InputParameters" name="parameter"/>
  </wsdl:message>
  <wsdl:message name="A_PROGRAM_RESPONSE_MSG.VERSION_1">
    <wsdl:documentation>A Data Repository</wsdl:documentation>
    <wsdl:part element="A_PROGRAM_RESPONSE_MSG.VERSION_1:root" name="parameter"/>
  </wsdl:message>
  <wsdl:portType name="A_PROGRAM_SERVICE_PortType">
    <wsdl:operation name="A_PROGRAM_OP">
      <wsdl:documentation>A Data Repository</wsdl:documentation>
      <wsdl:input message="tns:A_PROGRAM_REQUEST_MSG.VERSION_1" name="A_PROGRAM_REQUEST_MSG.VERSION_1"/>
      <wsdl:output message="tns:A_PROGRAM_RESPONSE_MSG.VERSION_1" name="A_PROGRAM_RESPONSE_MSG.VERSION_1"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="A_PROGRAM_SERVICE_Binding" type="tns:A_PROGRAM_SERVICE_PortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="A_PROGRAM_OP">
      <soap:operation soapAction="A_PROGRAM_OP.v1" style="document"/>
      <wsp:Policy wsu:Id="UsernameTokenSecurityPolicyPasswordOptional" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <wsp:ExactlyOne>
          <wsp:All>
            <wsse:SecurityToken wsp:Usage="wsp:Required" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
              <wsse:TokenType>wsse:UserNameToken</wsse:TokenType>
              <Claims>
                <SubjectName MatchType="wsse:Exact"/>
                <UsePassword wsp:Usage="wsp:Optional"/>
              </Claims>
            </wsse:SecurityToken>
          </wsp:All>
        </wsp:ExactlyOne>
      </wsp:Policy>
      <wsdl:input name="A_PROGRAM_REQUEST_MSG.VERSION_1">
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
      </wsdl:input>
      <wsdl:output name="A_PROGRAM_RESPONSE_MSG.VERSION_1">
        <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="A_PROGRAM_SERVICE">
    <wsdl:documentation>A Data Repository</wsdl:documentation>
    <wsdl:port binding="tns:A_PROGRAM_SERVICE_Binding" name="A_PROGRAM_SERVICE_Port">
      <soap:address location="http://some_url_here/PSIGW/PeopleSoftServiceListeningConnector/SYSTEMNAME"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
Was it helpful?

Solution

With deeper analysis, I figured it out. One of the imported XSDs has maxOccurs="unbounded" in the root element. This makes no sense because the root element can only appear once in an XML document.

Visual Studio sure could use a more clear error message!

Thanks to @JohnSaunders for helping me think about checking the imports.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top