Thanks for the input, I truly, truly appreciate the help.
I am working on setting up the client as an Axis app so I can use the tcpmon and capture the SOAP streams. (So far I've pretty much been using the command-line.) When I get it up I'll post the message with SOAP headers and all.
ITMT, here is the returned String:
<?xml version="1.0"?><NewDataSet>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="AVSRespCode">
<xs:complexType>
<xs:sequence>
<xs:element name="AVSCode" type="xs:string" minOccurs="0" />
<xs:element name="AVSMessage" type="xs:string" minOccurs="0" />
<xs:element name="ID" type="xs:int" minOccurs="0" />
<xs:element name="Status" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<AVSRespCode>
<AVSCode>5</AVSCode>
<AVSMessage>Edit-error - AVS data is invalid</AVSMessage>
<ID>6</ID>
<Status>E</Status>
</AVSRespCode>
</NewDataSet>
Thanks again, Elaine
Anne Thomas Manes wrote:
Actually, I just realized that there might be one more layer of wrapper in the response message. If you can give a sample SOAP response message, that would help.
But, based on your current WSDL definition, I expect your response message schema to look like this:
<s:element name="GetAVSResponseCodeValueResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="GetAVSResponseCodeValueResult" /> <s:complexType> <s:sequence> <s:element name="NewDataSet"> <s:complexType> <s:sequence> <s:element name="s:AVSRespCode"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="AVSCode" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="AVSMessage" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:string"/> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element>
On Mon, 28 Feb 2005 18:28:36 -0500, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
I'm with Dino. I think you should convince your card processing service people to provide you with a decent schema. My chief concern is in regards to future maintenance. What if these "card processing service" people decide to change the message structure at some point in the future. Do they have a plan to inform you of these changes?
If they aren't willing to provide you with a schema, then it's relatively easy for you to construct one from the format they've supplied. Do you know if they are using any namespaces in the XML string? Your sample shows no namespaces, but if they add them, that will definitely impact your WSDL definition.
Your schema should look like this:
<s:element name="GetAVSResponseCodeValueResponse"> <s:complexType> <s:sequence> <s:element name="NewDataSet"> <s:complexType> <s:sequence> <s:element name="s:AVSRespCode"> <s:complexType> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="AVSCode" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="AVSMessage" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:string"/> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element>
- Anne
On Mon, 28 Feb 2005 14:43:23 -0800, Dino Chiesa <[EMAIL PROTECTED]> wrote:
Not stupid...
Your approach is reasonable, but... Can you not contact the "card processing service" people and ask them to resolve the difference between the doc and the WSDL ?
-----Original Message----- From: Elaine Nance [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 3:45 PM To: [email protected] Subject: Handmade WSDL?
Hope this is not stupid, but
Problem: the wsdl for our (supposedly) enterprise credit card processing service shows well defined request parameters, but the SOAP responses are all designated as string, as shown below.
I am thinking that the best way to generate the client stubs I need in Java is to create a wsdl with better response typing and generate the stubs using WSDL2Java and then test.
Does it make sense to proceed like the above? or should I just build parsers using SAX or DOM or whatever?
Thank you, Elaine
- example request <s:element name="GetAVSResponseCodeValue"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="sCode" type="s:string" /> </s:sequence> </s:complexType> </s:element>
- example response as given <s:element name="GetAVSResponseCodeValueResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="GetAVSResponseCodeValueResult" type="s:string" /> </s:sequence> </s:complexType> </s:element>
- WHAT THE RESPONSE SHOULD LOOK LIKE (I THINK) <s:element name="GetAVSResponseCodeValueResponse"> <s:complexType type="s:AVSRespCode"> <s:sequence> <s:element minOccurs="1" maxOccurs="1" name="AVSCode" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="AVSMessage" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:string"/> </s:sequence> </s:complexType> </s:element>
- ALTERNATIVELY <s:element name="GetAVSResponseCodeValueResponse"> <s:complexType type="s:NewDataSet"> <s:sequence type="s:AVSRespCode"> <s:element minOccurs="1" maxOccurs="1" name="AVSCode" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="AVSMessage" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="ID" type="s:string"/> <s:element minOccurs="1" maxOccurs="1" name="Status" type="s:string"/> </s:sequence> </s:complexType> </s:element>
- the web service docs indicate that the xml returned (minus SOAP envelope) will look like the following:
<NewDataSet> <AVSRespCode> <AVSCode>1</AVSCode> <AVSMessage>No Address Supplied</AVSMessage> <ID>1</ID> <Status>E</Status> </AVSRespCode> </NewDataSet>
<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
