Creating a New Webservice Connector - Developer 6.5

Hi Folks,

Note: this may appear to be a large post but I wanted to be sure to provide enough detail.

Also, Thanks in advance for any assistance.

Okay, here’s the scoop.
I have a web service that I want to set up a call to from with in Developer. So I created a new webservice connector. The existing web service has four operations.

The input (Request) is a complex type with a couple “is-a” relationships and a couple “has-a” relationships. The output (Response) from the service is a complex type as well, and it “has-a” attribute that is the same type as the original input object graph.

From outside of webMethods, using traditional clients, I can call this web service and it returns successfully the correct object graph. I have called it from a normal client the was used with wsdl2java and from a WSIF client as well.

When I create a Web Service Connector from my wsdl, when I am in Developer, webMethods complains about the wsdl. It says “[ITD.0012.0011] Web Service Connector created successfully but with warnings.” A portion of the details message is pasted below.

When I look at the docTypes that were created for my Request, it appears that the relationships are all correct. But the Response docType is missing some of the relationships. It is missing the (has-a) attribute that is the same “type” as the input (request). Again, remember, the Output (Response) “has-a” attribute that is the same complex type as the input (Request).

When we try to run the web service in webMethods, it appears to be getting back all of the data and relationships that it should, but, it does not know what to do with them because, of course, there is a mis-match between what comes back and the Response docType.

Below are screen shots of the Request and the Response. The Request appears correct but the attribute in the Response called “requestInput” should look exactly the same as the Request but does not.

Finally, I will post the wsdl in a separate post as this one will be too long!

THE REQUEST

THE RESPONSE

THE ERROR MSG DETAILS
URL: [URL=“http://wpd2014613:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService?wsdl”]http://wpd2014613:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService?wsdl[/URL]
Path name:
PortType: ScheduleAndDeliveryServiceRemote
Operation: saveAIScheduleRequest
WSDL code: S-9043
[ISS.0092.9043] Schema Error: 1
pathName: null
errorCode: XSDC-081
errorMessage: [ISC.0082.9702] Duplicate definition found in schema nextEBICRDelivery.connector.ScheduleAndDeliveryServiceRemote.docType:schema_saveAIScheduleRequestRequest with the same target namespace.
identifier: /schema/complexType[@name=“PartyRequestVO”]

URL: [URL=“http://wpd2014613:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService?wsdl”]http://wpd2014613:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService?wsdl[/URL]
Path name:
PortType: ScheduleAndDeliveryServiceRemote
Operation: saveAIScheduleRequest
WSDL code: S-9043
[ISS.0092.9043] Schema Error: 2

Note: it appeared the original post did not allow the screen shot bit maps. I will try to get them posted in some other way.
Most of THE WSDL

 <?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions targetNamespace="[URL="http://localhost:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService"]http://localhost:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService[/URL]" xmlns="[URL="http://schemas.xmlsoap.org/wsdl/"]http://schemas.xmlsoap.org/wsdl/[/URL]" xmlns:apachesoap="[URL="http://xml.apache.org/xml-soap"]http://xml.apache.org/xml-soap[/URL]" xmlns:impl="[URL="http://localhost:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService"]http://localhost:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService[/URL]" xmlns:intf="[URL="http://localhost:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService"]http://localhost:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService[/URL]" xmlns:soapenc="[URL="http://schemas.xmlsoap.org/soap/encoding/"]http://schemas.xmlsoap.org/soap/encoding/[/URL]" xmlns:tns1="ScheduleAndDelivery" xmlns:tns2="[URL="http://protocol.dc.ing.com"]http://protocol.dc.ing.com[/URL]" xmlns:tns3="[URL="http://valueobject.dc.ing.com"]http://valueobject.dc.ing.com[/URL]" xmlns:wsdl="[URL="http://schemas.xmlsoap.org/wsdl/"]http://schemas.xmlsoap.org/wsdl/[/URL]" xmlns:wsdlsoap="[URL="http://schemas.xmlsoap.org/wsdl/soap/"]http://schemas.xmlsoap.org/wsdl/soap/[/URL]" xmlns:xsd="[URL="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/URL]">
- <wsdl:types>
- <schema targetNamespace="ScheduleAndDelivery" xmlns="[URL="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/URL]">
<import namespace="[URL="http://schemas.xmlsoap.org/soap/encoding/"]http://schemas.xmlsoap.org/soap/encoding/[/URL]" /> 
- <complexType name="PartyRequestVO">
+ <sequence>
<element name="genderCode" type="xsd:int" /> 
<element name="line2FullName" nillable="true" type="xsd:string" /> 
<element name="requestId" type="xsd:int" /> 
<element name="prefixTitle" nillable="true" type="xsd:string" /> 
<element name="suffixTitle" nillable="true" type="xsd:string" /> 
<element name="middleName" nillable="true" type="xsd:string" /> 
<element name="fullName" nillable="true" type="xsd:string" /> 
<element name="birthDate" nillable="true" type="xsd:dateTime" /> 
<element name="salutation" nillable="true" type="xsd:string" /> 
<element name="partyTypeId" type="xsd:int" /> 
<element name="address" nillable="true" type="xsd:string" /> 
<element name="firstName" nillable="true" type="xsd:string" /> 
<element name="lastName" nillable="true" type="xsd:string" /> 
<element name="taxIdNumber" nillable="true" type="xsd:string" /> 
</sequence>
</complexType>
- <complexType name="ElectronicNotificationRequestVO">
+ <sequence>
<element name="deliveryLocationPw" nillable="true" type="xsd:string" /> 
<element name="electronicAddress" nillable="true" type="xsd:string" /> 
<element name="requestId" type="xsd:int" /> 
<element name="electronicAddressTypeCode" type="xsd:int" /> 
<element name="deliveryLocationId" nillable="true" type="xsd:string" /> 
</sequence>
</complexType>
- <complexType name="ReturnMessage">
+ <sequence>
<element name="severity" nillable="true" type="xsd:string" /> 
<element name="code" nillable="true" type="xsd:string" /> 
<element name="text" nillable="true" type="xsd:string" /> 
</sequence>
</complexType>
- <complexType name="BusinessKeyValueObject">
+ <sequence>
<element name="sourceSystem" nillable="true" type="xsd:string" /> 
<element name="planNo" nillable="true" type="xsd:string" /> 
<element name="agreementType" nillable="true" type="xsd:string" /> 
<element name="participantNo" nillable="true" type="xsd:string" /> 
<element name="companyCode" nillable="true" type="xsd:string" /> 
</sequence>
</complexType>
- <complexType name="MoneySourceRequestVO">
+ <sequence>
<element name="requestId" type="xsd:int" /> 
<element name="code" nillable="true" type="xsd:string" /> 
<element name="defaultedFlag" nillable="true" type="xsd:string" /> 
<element name="maximumPercent" type="xsd:double" /> 
<element name="feeAmount" type="xsd:double" /> 
<element name="defaultedReasonCode" type="xsd:int" /> 
<element name="amount" type="xsd:double" /> 
<element name="percent" type="xsd:double" /> 
<element name="maximumAmount" type="xsd:double" /> 
</sequence>
</complexType>
- <complexType name="ResponseOutput">
- <sequence>
<element name="returnMessages" nillable="true" type="impl:ArrayOf_tns1_ReturnMessage" /> 
<element name="status" type="xsd:int" /> 
<element name="completionDate" nillable="true" type="xsd:dateTime" /> 
<element name="receiptDate" nillable="true" type="xsd:dateTime" /> 
<element name="requestInput" nillable="true" type="tns2:RequestInput" /> 
<element name="uniqueId" nillable="true" type="xsd:string" /> 
</sequence>
</complexType>
- <complexType name="ScheduleRequestVO">
- <complexContent>
- <extension base="tns3:RequestAgreementValueObject">
- <sequence>
<element name="startDate" nillable="true" type="xsd:dateTime" /> 
<element name="parties" nillable="true" type="impl:ArrayOf_tns1_PartyRequestVO" /> 
<element name="electronicNotification" nillable="true" type="tns1:ElectronicNotificationRequestVO" /> 
<element name="nextDate" nillable="true" type="xsd:dateTime" /> 
<element name="lastDate" nillable="true" type="xsd:dateTime" /> 
<element name="frequency" type="xsd:int" /> 
<element name="moneySources" nillable="true" type="impl:ArrayOf_tns1_MoneySourceRequestVO" /> 
<element name="businessKey" nillable="true" type="tns1:BusinessKeyValueObject" /> 
<element name="endDate" nillable="true" type="xsd:dateTime" /> 
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
- <schema targetNamespace="[URL="http://localhost:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService"]http://localhost:7001/ScheduleAndDelivery/axis/services/ScheduleAndDeliveryService[/URL]" xmlns="[URL="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/URL]">
<import namespace="[URL="http://schemas.xmlsoap.org/soap/encoding/"]http://schemas.xmlsoap.org/soap/encoding/[/URL]" /> 
- <complexType name="ArrayOf_tns1_ReturnMessage">
- <complexContent>
- <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:ReturnMessage[]" /> 
</restriction>
</complexContent>
</complexType>
- <complexType name="ArrayOf_tns1_PartyRequestVO">
- <complexContent>
- <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:PartyRequestVO[]" /> 
</restriction>
</complexContent>
</complexType>
- <complexType name="ArrayOf_tns1_MoneySourceRequestVO">
- <complexContent>
- <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:MoneySourceRequestVO[]" /> 
</restriction>
</complexContent>
</complexType>
</schema>
- <schema targetNamespace="[URL="http://protocol.dc.ing.com"]http://protocol.dc.ing.com[/URL]" xmlns="[URL="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/URL]">
<import namespace="[URL="http://schemas.xmlsoap.org/soap/encoding/"]http://schemas.xmlsoap.org/soap/encoding/[/URL]" /> 
- <complexType name="RequestInput">
+ <sequence>
<element name="detailLevel" nillable="true" type="xsd:string" /> 
<element name="requestorId" nillable="true" type="xsd:string" /> 
<element name="requestDate" nillable="true" type="xsd:dateTime" /> 
<element name="applicationId" nillable="true" type="xsd:string" /> 
<element name="uniqueId" nillable="true" type="xsd:string" /> 
</sequence>
</complexType>
</schema>
- <schema targetNamespace="[URL="http://valueobject.dc.ing.com"]http://valueobject.dc.ing.com[/URL]" xmlns="[URL="http://www.w3.org/2001/XMLSchema"]http://www.w3.org/2001/XMLSchema[/URL]">
<import namespace="[URL="http://schemas.xmlsoap.org/soap/encoding/"]http://schemas.xmlsoap.org/soap/encoding/[/URL]" /> 
- <complexType name="RequestValueObject">
- <complexContent>
- <extension base="tns2:RequestInput">
+ <sequence>
<element name="typeId" type="xsd:int" /> 
<element name="requestId" type="xsd:int" /> 
<element name="serviceLogId" type="xsd:int" /> 
<element name="requestInitiatingEventCode" type="xsd:int" /> 
<element name="confirmationRequiredFlag" nillable="true" type="xsd:string" /> 
<element name="sourceReferenceText" nillable="true" type="xsd:string" /> 
<element name="effectiveDate" nillable="true" type="xsd:dateTime" /> 
<element name="requestSourceId" type="xsd:int" /> 
<element name="languageCode" type="xsd:int" /> 
</sequence>
</extension>
</complexContent>
</complexType>
- <complexType name="RequestAgreementValueObject">
- <complexContent>
- <extension base="tns3:RequestValueObject">
+ <sequence>
<element name="iaAgreementId" type="xsd:int" /> 
<element name="requestAgreementLevel" type="xsd:int" /> 
<element name="gaAgreementId" type="xsd:int" /> 
<element name="locationReferenceText" nillable="true" type="xsd:string" /> 
<element name="requestAgreementId" type="xsd:int" /> 
</sequence>
</extension>
</complexContent>
</complexType>
</schema>

Can you manually correct the response document type definition to include the missing attributes? The web service connector wizard does what it can but it sometimes doesn’t/can’t do the right thing.

Joey,

Feel free to edit your original post in order to attach screen shots or WSDL’s using the Manage Attachments button.

In general, if your web service can be invoked successfully with another soap client, you can do the same from IS. However, Web Service Connector wizard is easily confused and I never recommend using it except for during early development or prototyping stages.

There are also some issues with creating IS doc types from schemas that make use of recursive or self-referencing schemas. If your WSDL contains such a schema in its “Types” section, the WSC will not be able to create the doc types. BTW, the warning messages you posted do not appear to be significant.

An approach to isolating this issue is to attempt to create doc types from the schemas either imported or defined in the WSDL. If the schema is defined inline in the WSDL, you’ll need to extract it to its own file. If the doc types can be created from the schema, then you should be able to use them to create a soap request that will invoke your service.

If there are recursive definitions in the schemas, you will need to redefine the types in question to remove the recursive definitions.

In summary:

  • you can build soap requests to invoke almost any web service,
  • using the web service connector for more than simple testing is a Bad Idea
  • you may need to tweak the schema referenced in the WSDL in order to generate doc types from its elements, if the schema contains recursive definitions

HTH,

Mark

Don’t copy schemas or WSDL’s directly from your browser as the text will include the “+” and “-” symbols used to denote indentation. Use your browser’s save as function and then attach the file using the Manage Attachments button after getting to the advanced editor using the “Go Advanced” button.

Also, the text you pasted does not make up a complete WSDL file. It is missing the end of the Types section and everything after that.

Mark

Hi Mark,
Do you think webMethods support derived types during run time using xsi:types.

I don’t understand your question. How is that related to Joey’s original post?