Im totally new to SOAP HTTP Requests. Can someone give me a broad rundown on things that might slow it down. Im working on a .NET application that uses SOAP, WSDL. The request is taking around 50 seconds, everytime. Im probably making no sense, so please excuse my ignorance. Could there be something I could do at my end, to allow the request to run without causing the page not to load. AJAX maybe.
--M
Edit (09/08/2009):
OK, i've used SOAPUI and its coming up with two options WebServiceSoap12 and WebServiceSoap. The first one is goving me a speedy milliseconds response, and the second is giving me a "400 Bad Request. Why would I need that second one?
Below is the WSDL
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.example.com" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.example.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.example.com">
<s:element name="EventGetList">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="regionId" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="EventGetListResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="EventGetListResult" type="tns:ArrayOfOpenEvent" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfOpenEvent">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="OpenEvent" nillable="true" type="tns:OpenEvent" />
</s:sequence>
</s:complexType>
<s:complexType name="OpenEvent">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Id" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Title" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="EventStart" type="s:dateTime" />
<s:element minOccurs="1" maxOccurs="1" name="EventEnd" type="s:dateTime" />
<s:element minOccurs="0" maxOccurs="1" name="RegionId" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="EventSubject" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="EventAdditionalDetails" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="EventDelivery" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Location" type="tns:EventLocation" />
<s:element minOccurs="1" maxOccurs="1" name="OnlineRegistrations" type="s:boolean" />
</s:sequence>
</s:complexType>
<s:complexType name="EventLocation">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Address1" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Address2" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Address3" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Town" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Postcode" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="AddressOther" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="EventRegisterClient">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="registration" type="tns:OpenEventRegistration" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="OpenEventRegistration">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="EventId" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="ForeName" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Surname" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="TelephoneNumber" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="EmailAddress" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="EventRegisterClientResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="EventRegisterClientResult" type="s:boolean" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="EventGetListSoapIn">
<wsdl:part name="parameters" element="tns:EventGetList" />
</wsdl:message>
<wsdl:message name="EventGetListSoapOut">
<wsdl:part name="parameters" element="tns:EventGetListResponse" />
</wsdl:message>
<wsdl:message name="EventRegisterClientSoapIn">
<wsdl:part name="parameters" element="tns:EventRegisterClient" />
</wsdl:message>
<wsdl:message name="EventRegisterClientSoapOut">
<wsdl:part name="parameters" element="tns:EventRegisterClientResponse" />
</wsdl:message>
<wsdl:portType name="WebServiceSBSpEventsSoap">
<wsdl:operation name="EventGetList">
<wsdl:input message="tns:EventGetListSoapIn" />
<wsdl:output message="tns:EventGetListSoapOut" />
</wsdl:operation>
<wsdl:operation name="EventRegisterClient">
<wsdl:input message="tns:EventRegisterClientSoapIn" />
<wsdl:output message="tns:EventRegisterClientSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WebServiceSBSpEventsSoap" type="tns:WebServiceSBSpEventsSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="EventGetList">
<soap:operation soapAction="http://www.example.com/EventGetList" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="EventRegisterClient">
<soap:operation soapAction="http://www.example.com/EventRegisterClient" 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="WebServiceSBSpEventsSoap12" type="tns:WebServiceSBSpEventsSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="EventGetList">
<soap12:operation soapAction="http://www.example.com/EventGetList" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="EventRegisterClient">
<soap12:operation soapAction="http://www.example.com/EventRegisterClient" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WebServiceSBSpEvents">
<wsdl:port name="WebServiceSBSpEventsSoap" binding="tns:WebServiceSBSpEventsSoap">
<soap:address location="http://www.example.com/webserviceexternal/WebServiceSBSpEvents.asmx" />
</wsdl:port>
<wsdl:port name="WebServiceSBSpEventsSoap12" binding="tns:WebServiceSBSpEventsSoap12">
<soap12:address location="http://www.example.com/webserviceexternal/WebServiceSBSpEvents.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
You should first try to pinpoint the cause of the delay, as there could be many reasons for it. Your main interest would be if the delay happens on the side of the server or on the side of (your) client.
If the delay is on the server side of things (might be a complicated operation to create a result, might be slow server, etc.), then you can look for workarounds to deal with that in your client, e.g.:
creating the page first and pulling the data from the service afterward via ajax, as you suggested
pulling the data from the service upfront in regular intervals and storing it in a local cache from which you construct your pages
etc...
If the delay is happening on the client side, you should try to find the root cause (e.g. network configuration, timeouts with reverse lookups, etc.) and fix it ;)
Edit: Given the posted wsdl, the web service offers itself in two variations, one for 'default' SOAP and one for SOAP 1.2. The 400 response indicates that the client is issuing the request in a non standard conform way, but it might also be that the service end is not properly set up for the protocol version it says to offer in the wsdl.
As for why you'd need one or the other, the answer is simple: Both offer the exact same methods, so you only need one. It could be that the delay is caused by your client first trying to use the defunct version a couple of times and only switching to the other after a while - but this is just guesswork. If SOAPUI works ok with the 1.2 version, I'd just try to tell the client to use that and see if that speeds things up.
Related
One of the webservices that we use in our ASP.Net product have issued a new WSDL. But they claim that there is no functionality change.
Since I am getting an exception, I am trying to compare the old and new WSDLs.
I see some format "language" differences.
Are these two different ways of expressing the Soap WSDL,
or are these following two different versions of schema writing? I could not find any mention of this online.
I am still a newbie to .Net world!
Should I just go ahead and recreate the references in .Net product simply and be done with it?
Anyways, this is the exception
Error Type: System.Web.Services.Protocols.SoapHeaderException
Error Message: Unexpected element {urn:SOAP_PmtPortal_Server}newOrder found. Expected {urn:ServerPmtPortal}newOrderRequest.
Error Source: System.Web.Services
Stack Trace: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
I am including the old and the new WSDL (stripping off all but one operation)
OLD WSDL (For the new WSDL, please see after this section)
<?xml version="1.0"?>
<definitions name="ServerPmtPortal" targetNamespace="urn:ServerPmtPortal" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="urn:ServerPmtPortal"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<types xmlns="http://schemas.xmlsoap.org/wsdl/"> </types>
<message name="newOrderRequest">
<part name="appID" type="xsd:string" />
<part name="merID" type="xsd:string" />
<part name="redURL" type="xsd:string" />
<part name="uname" type="xsd:string" />
<part name="cmt" type="xsd:string" />
</message>
<message name="newOrderResponse">
<part name="tranID" type="xsd:string" />
</message>
<portType name="ServerPmtPortalPort">
<operation name="newOrder">
<input message="tns:newOrderRequest" />
<output message="tns:newOrderResponse" />
</operation>
</portType>
<binding name="ServerPmtPortalBinding" type="tns:ServerPmtPortalPort">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="newOrder">
<soap:operation
soapAction="urn:SOAP_PmtPortal_Server#SOAP_PmtPortal_Server#newOrder" />
<input>
<soap:body use="encoded" namespace="urn:SOAP_PmtPortal_Server"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</input>
<output>
<soap:body use="encoded" namespace="urn:SOAP_PmtPortal_Server"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
</output>
</operation>
</binding>
<service name="ServerPmtPortalService">
<documentation />
<port name="ServerPmtPortalPort" binding="tns:ServerPmtPortalBinding">
<soap:address location="https://www.service.com/paynow/service/server.php" />
</port>
</service>
</definitions>
NEW WSDL is like this
<?xml version='1.0' encoding='UTF-8'?>
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:ServerPmtPortal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="ServerPmtPortalService"
targetNamespace="urn:ServerPmtPortal">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:ServerPmtPortal" version="1.0">
<xs:element name="newOrderRequest">
<xs:complexType>
<xs:all>
<xs:element name="appID" type="xs:string"/>
<xs:element name="merID" type="xs:string"/>
<xs:element name="redURL" type="xs:string"/>
<xs:element minOccurs="0" name="uname" type="xs:string"/>
<xs:element minOccurs="0" name="cmt" type="xs:string"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="newOrderResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="tranID" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="newOrder">
<wsdl:part element="tns:newOrderRequest" name="body">
</wsdl:part>
</wsdl:message>
<wsdl:message name="newOrderResponse">
<wsdl:part element="tns:newOrderResponse" name="body">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="ServerPmtPortalPort">
<wsdl:operation name="newOrder">
<wsdl:input message="tns:newOrder" name="newOrder">
</wsdl:input>
<wsdl:output message="tns:newOrderResponse" name="newOrderResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServerPmtPortalServiceSoapBinding" type="tns:ServerPmtPortalPort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="newOrder">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="newOrder">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="newOrderResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ServerPmtPortalService">
<wsdl:port binding="tns:ServerPmtPortalServiceSoapBinding" name="ServerPmtPortalPort">
<soap:address location="https://stage.service.com/Pmt-proxy/services/v1/paynow"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I do not know how to make sense of the difference in the WSDL definitions.
From the way the client or stub code is generated, method newOrder for the old WSDL is taking 5 separate parameters: appID, merID, redURL, uname, cmt.
The new WSDL method is taking only one parameter, which is newOrderRequest which in turn contains 5 properties.
I generated the new stub and using it, and told the respective people that we cannot point to the new WSDL without making changes to the code.
The standard configuration of WSO2 API Manager 2.6.0 exposes a number of product services without enforcing authentication and authorisation controls through the usual OAuth token mechanism employed by WSO2. These services (/services/echo, /services/Version and /services/WorkflowCallbackService) presents unauthenticated users with product and service information you would not generally want to provide.
Without requiring a bearer token, WSO2 would gladly return the Version information and WorkflowCallbackService WSDL upon request.
curl --insecure https://localhost:8243/services/Version
<ns:getVersionResponse xmlns:ns="http://version.services.core.carbon.wso2.org"><return>WSO2 API Manager-2.6.0</return></ns:getVersionResponse>
AND
curl --insecure https://localhost:8243/services/WorkflowCallbackService?wsdl
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://callback.workflow.apimgt.carbon.wso2.org" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://callback.workflow.apimgt.carbon.wso2.org">
<wsdl:documentation>WorkflowCallbackService</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://callback.workflow.apimgt.carbon.wso2.org">
<xs:element name="resumeEvent">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="workflowReference" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="status" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="description" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="resumeEventResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="resumeEventRequest">
<wsdl:part name="parameters" element="ns:resumeEvent"/>
</wsdl:message>
<wsdl:message name="resumeEventResponse">
<wsdl:part name="parameters" element="ns:resumeEventResponse"/>
</wsdl:message>
<wsdl:portType name="WorkflowCallbackServicePortType">
<wsdl:operation name="resumeEvent">
<wsdl:input message="ns:resumeEventRequest" wsaw:Action="urn:resumeEvent"/>
<wsdl:output message="ns:resumeEventResponse" wsaw:Action="urn:resumeEventResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WorkflowCallbackServiceSoap11Binding" type="ns:WorkflowCallbackServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="resumeEvent">
<soap:operation soapAction="urn:resumeEvent" 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="WorkflowCallbackServiceSoap12Binding" type="ns:WorkflowCallbackServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="resumeEvent">
<soap12:operation soapAction="urn:resumeEvent" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WorkflowCallbackServiceHttpBinding" type="ns:WorkflowCallbackServicePortType">
<http:binding verb="POST"/>
<wsdl:operation name="resumeEvent">
<http:operation location="resumeEvent"/>
<wsdl:input>
<mime:content type="text/xml" part="parameters"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WorkflowCallbackService">
<wsdl:port name="WorkflowCallbackServiceHttpsSoap11Endpoint" binding="ns:WorkflowCallbackServiceSoap11Binding">
<soap:address location="https://DRACARYS:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsSoap11Endpoint"/>
</wsdl:port>
<wsdl:port name="WorkflowCallbackServiceHttpSoap11Endpoint" binding="ns:WorkflowCallbackServiceSoap11Binding">
<soap:address location="http://DRACARYS:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpSoap11Endpoint"/>
</wsdl:port>
<wsdl:port name="WorkflowCallbackServiceHttpsSoap12Endpoint" binding="ns:WorkflowCallbackServiceSoap12Binding">
<soap12:address location="https://DRACARYS:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsSoap12Endpoint"/>
</wsdl:port>
<wsdl:port name="WorkflowCallbackServiceHttpSoap12Endpoint" binding="ns:WorkflowCallbackServiceSoap12Binding">
<soap12:address location="http://DRACARYS:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpSoap12Endpoint"/>
</wsdl:port>
<wsdl:port name="WorkflowCallbackServiceHttpsEndpoint" binding="ns:WorkflowCallbackServiceHttpBinding">
<http:address location="https://DRACARYS:8243/services/WorkflowCallbackService.WorkflowCallbackServiceHttpsEndpoint"/>
</wsdl:port>
<wsdl:port name="WorkflowCallbackServiceHttpEndpoint" binding="ns:WorkflowCallbackServiceHttpBinding">
<http:address location="http://DRACARYS:8280/services/WorkflowCallbackService.WorkflowCallbackServiceHttpEndpoint"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I am looking for a way to configure the endpoint (through mediation flow or service proxy) to return a 401 Unauthorized error to a request which doesn't include a valid OAuth token.
First
Issue:
Not able to add new API Proxy by importing existing SOAP WSDL
Error:
Fetch WSDL Error: Could not download resource. peer not authenticated
My view:
I suspect is caused by WSDL structure contains import XSD which derived from another link.
<xsd:import namespace="http://XXX/message" schemaLocation="https://XXX:123/xxxservices/XxxWebService?xsd=1"/>
Tried modifying my WSDL , instead of using import from external URL, I copied the whole XSD structure into the WSDL. It works!
Question:
What is the issue behind the validation process? f.y.i. I have also imported the certificate into my Java truststore (cacerts)
Second
Issue:
Few elements/parameters not populated after successfully imported the WSDL
Portion of my WSDL :
<xs:complexContent>
<xs:extension base="ns:UserDetailsRequest">
<xs:sequence>
<xs:extension base="ns:UserDetailsRequest">
<xs:sequence>
<xs:element name="password" type="xs:string" minOccurs="0"/>
<xs:element name="userID" type="xs:string" minOccurs="0"/>
</xs:sequence>
My view:
I found out that the Apigee does not populate the parameters of password and userID, I suspect the issue is caused by implementing XML extension base component
Question:
How to solve the missing parameters issue?
Thank you!
My whole WSDL is below:
<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.docx.abc.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservice.docx.abc.com/" name="XyzWebService">
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.docx.abc.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservice.docx.abc.com/" name="XyzWebService">
<types>
<xsd:schema>
<xsd:import namespace="http://webservice.docx.abc.com/message" schemaLocation="https://www.xxx.com:123/docxservices/XyzWebService?xsd=1" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://webservice.docx.abc.com/" schemaLocation="https://www.xxx.com:123/docxservices/XyzWebService?xsd=2" />
</xsd:schema>
</types>
<message name="docUpload">
<part name="parameters" element="tns:docUpload" />
</message>
<message name="docUploadResponse">
<part name="parameters" element="tns:docUploadResponse" />
</message>
<portType name="XyzWebServicePortType">
<operation name="docUpload">
<input message="tns:docUpload" />
<output message="tns:docUploadResponse" />
</operation>
</portType>
<binding name="XyzWebServicePortTypePortBinding" type="tns:XyzWebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="docUpload">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="XyzWebService">
<port name="XyzWebServicePortTypePort" binding="tns:XyzWebServicePortTypePortBinding">
<soap:address location="https://www.xxx.com:123/docxservices/XyzWebService" />
</port>
</service>
</definitions>
1st XSD:
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).-->
<xs:schema version="1.0" targetNamespace="http://webservice.docx.abc.com/message" xmlns:xns="http://webservice.docx.abc.com/message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="DocumentUserDetailsRequest">
<xs:sequence>
<xs:element name="password" type="xs:string" minOccurs="0"/>
<xs:element name="userID" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentResponseStatus">
<xs:sequence>
<xs:element name="errorDetailsMap">
<xs:complexType>
<xs:sequence>
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="key" minOccurs="0" type="xs:string"/>
<xs:element name="value" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="success" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentUploadRequest">
<xs:complexContent>
<xs:extension base="xns:DocumentUserDetailsRequest">
<xs:sequence>
<xs:element name="docName" type="xs:string" minOccurs="0"/>
<xs:element name="folderName" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DocumentUploadResponse">
<xs:complexContent>
<xs:extension base="xns:DocumentResponseStatus">
<xs:sequence>
<xs:element name="docNumber" type="xs:string" minOccurs="0"/>
<xs:element name="docName" type="xs:string" minOccurs="0"/>
<xs:element name="Date" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
2nd XSD:
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).-->
<xs:schema version="1.0" targetNamespace="http://webservice.docx.abc.com/" xmlns:xns="http://webservice.docx.abc.com/" xmlns:ns1="http://webservice.docx.abc.com/message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://webservice.docx.abc.com/message" schemaLocation="XyzWebService.xsd"/>
<xs:element name="docUpload" type="xns:docUpload"/>
<xs:element name="docUploadResponse" type="xns:docUploadResponse"/>
<xs:complexType name="docUpload">
<xs:sequence>
<xs:element name="arg0" type="ns1:DocumentUploadRequest" minOccurs="0"/>
<xs:element name="arg1" type="xs:base64Binary" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="docUploadResponse">
<xs:sequence>
<xs:element name="return" type="ns1:DocumentUploadResponse" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
This is not an answer - I 'm just posting it here so you can read it.
Your original imports look fine to me and should be supported.
I took your files, and gave them valid import references (they were still referencing and external server) and everything worked when I tried it, so I'm going to need your original hosted WSDL, XSDs to better diagnose the issue. Is that possible?
File contents:
WSDL
<?xml version='1.0' encoding='UTF-8'?>
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservice.docx.abc.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservice.docx.abc.com/" name="XyzWebService">
<types>
<xsd:schema>
<xsd:import namespace="http://webservice.docx.abc.com/message" schemaLocation="XyzWebService1.xsd" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://webservice.docx.abc.com/" schemaLocation="XyzWebService2.xsd" />
</xsd:schema>
</types>
<message name="docUpload">
<part name="parameters" element="tns:docUpload" />
</message>
<message name="docUploadResponse">
<part name="parameters" element="tns:docUploadResponse" />
</message>
<portType name="XyzWebServicePortType">
<operation name="docUpload">
<input message="tns:docUpload" />
<output message="tns:docUploadResponse" />
</operation>
</portType>
<binding name="XyzWebServicePortTypePortBinding" type="tns:XyzWebServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="docUpload">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="XyzWebService">
<port name="XyzWebServicePortTypePort" binding="tns:XyzWebServicePortTypePortBinding">
<soap:address location="https://www.xxx.com:123/docxservices/XyzWebService" />
</port>
</service>
</definitions>
XyzWebService1.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).-->
<xs:schema version="1.0" targetNamespace="http://webservice.docx.abc.com/message" xmlns:xns="http://webservice.docx.abc.com/message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="DocumentUserDetailsRequest">
<xs:sequence>
<xs:element name="password" type="xs:string" minOccurs="0"/>
<xs:element name="userID" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentResponseStatus">
<xs:sequence>
<xs:element name="errorDetailsMap">
<xs:complexType>
<xs:sequence>
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="key" minOccurs="0" type="xs:string"/>
<xs:element name="value" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="success" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DocumentUploadRequest">
<xs:complexContent>
<xs:extension base="xns:DocumentUserDetailsRequest">
<xs:sequence>
<xs:element name="docName" type="xs:string" minOccurs="0"/>
<xs:element name="folderName" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DocumentUploadResponse">
<xs:complexContent>
<xs:extension base="xns:DocumentResponseStatus">
<xs:sequence>
<xs:element name="docNumber" type="xs:string" minOccurs="0"/>
<xs:element name="docName" type="xs:string" minOccurs="0"/>
<xs:element name="Date" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
XyzWebService2.xsd
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Oracle JAX-WS 2.1.3-07/10/2008 08:41 PM(bt).-->
<xs:schema version="1.0" targetNamespace="http://webservice.docx.abc.com/" xmlns:xns="http://webservice.docx.abc.com/" xmlns:ns1="http://webservice.docx.abc.com/message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://webservice.docx.abc.com/message" schemaLocation="XyzWebService.xsd"/>
<xs:element name="docUpload" type="xns:docUpload"/>
<xs:element name="docUploadResponse" type="xns:docUploadResponse"/>
<xs:complexType name="docUpload">
<xs:sequence>
<xs:element name="arg0" type="ns1:DocumentUploadRequest" minOccurs="0"/>
<xs:element name="arg1" type="xs:base64Binary" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="docUploadResponse">
<xs:sequence>
<xs:element name="return" type="ns1:DocumentUploadResponse" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Although you have your domains redacted, I notice you have a port number :123 on your resource:
https://www.xxx.com:123/docxservices/XyzWebService?xsd=1
Assume that all resources need to be reachable by Amazon AWS servers and that odd ports might be blocked. So if your https resource isn't on 443 it may be a problem for the Apigee system to connect to it.
I'm trying to unmarshal a large xhtml document using XSD's and jaxb. I've got everything working except for one part, which contains pure html. Here is an example of the xhtml I'm getting (I am able to grab every element except the "content"):
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text">...</title>
<id>...</id>
<updated>...</updated>
<entry>
<id>...</id>
<title type="text">...</title>
<updated>...</updated>
<author>
<name>...</name>
</author>
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
<div>{html...}<div>{html...}</div>/<div>/<div>
</content>
</entry>
</feed>
Here's an expansion of the xsd file:
<xsd:complexType name="ApCategoriesJAXB" >
<xsd:sequence>
<xsd:element name="id" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="title" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="updated" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="link" type="tns:ApLinkJAXB" minOccurs="0"></xsd:element>
<xsd:element name="entry" type="tns:ApEntryJAXB" minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ApEntryJAXB">
<xsd:sequence>
<xsd:element name="id" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="name" type="xsd:string" minOccurs="0"></xsd:element>
<xsd:element name="title" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="updated" type="xsd:string" minOccurs="1" maxOccurs="1"></xsd:element>
<xsd:element name="author" type="tns:ApAuthorJAXB" minOccurs="0"></xsd:element>
<xsd:element name="link" type="tns:ApLinkJAXB" minOccurs="0"></xsd:element>
<xsd:element name="category" type="tns:ApCategoryJAXB" minOccurs="0"></xsd:element>
<xsd:element name="content" type="tns:ApContentJAXB" minOccurs="0"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ApCategoryJAXB" >
<xsd:sequence></xsd:sequence>
<xsd:attribute name="term" type="xsd:string" />
<xsd:attribute name="label" type="xsd:string" />
<xsd:attribute name="scheme" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="ApContentJAXB" >
<xsd:sequence>
<xsd:element name="div" type="tns:ApDivJAXB" minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ApDivJAXB" >
<xsd:sequence>
<xsd:any namespace="http://www.w3.org/2005/Atom" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
I have tried every combination of nested xsd elements, complexTypes, xsd:any etc etc and cannot seem to get this "content" value no matter what I try. I am happy to take all the html as a string, or unmarshal it into an object.
Thank you in advance for any thoughts.
** I've edited the xsd part to include relevant parts. I've tried both nesting the "any" element in the "div" complexType as seen, as well as skipping the "div" complexType altogether.
Thanks again.
If you want <content> to have a type of xsd:string, you need to encode or otherwise escape the HTML. You could use CDATA sections, Base64 encoding, or escape all the entities (e.g. < to <, etc.).
Otherwise, xsd:any should work. Can you provide a more complete example of your XSD when you tried this?
Property of webservice
<s:complexType name="Package_Attributes">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Title" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="ID" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="PackageID" type="s:int"/>
</s:sequence>
</s:complexType>
Grails code
def result = proxy.GetPackageAttributes()
render result.ID
render result.PACKAGEID
Error
i am able to get "ID"
but "PACKAGEID" is not working
i am able to consume this in Dot.Net platform, so there is no problem with webservice...