axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Leone" <markleone...@hotmail.com>
Subject RE: Beginners help
Date Thu, 15 Apr 2004 17:15:52 GMT
Steffen:

Davanum Srinivas has posted a solution to your problem in response to bug 
AXIS-1283. The solution requires a change to the wsdl (which I undersand may 
not be an option for you), and it looks to me like the wsdl you're trying to 
use is compliant with the W3C Note. Nevertheless, the following illustrtes 
what would need to change in your wsdl to make it work.

In his comments to the aforementioned bug Davanum points to a wsdl file at 
http://cvs.apache.org/viewcvs.cgi/ws-axis/java/test/wsdl/interop4/groupG/mime/rpc/mime-rpc.wsdl?view=markup

as an example for handling mime:multiPartRelated attacments inbound and 
outbound. I noticed three significant differences between his wsdl and the 
wsdl you are trying to use. Through experimenting, I found that two of those 
differences must be applied to the problem wsdl in oder to make it work.

Required changes:

1. For the portType operations in the current wsdl, the <input...> and 
<output...> child delements have only a message attribute. You need to 
define a name attribue as well, and then when you reference the <input...> 
and <output...> elements in the bindings section of the wsdl, reference them 
by the name attribute defined above, not the message attribute, as it is 
currently in the wsdl.

2. Applying the fix abve will resolve the problem you reported, but you will 
now fet a NullPointerException for QNames referenced in your mime parts. To 
resolve this you must change the value of the type aatribute in your 
<mime:content...> elements from "application/binary" to 
"application/octetstream".

This results in sucessful generation of the client stubs. I didn't write a 
client to invoke the service.

Note that the wsdl that Davanum points to also differs in that multiple 
attachments are encoded as an array and then bound with a single 
<mme:content...> element in the bindings section. The wsdl you're using 
treats multiple attachments without encoding them as arrays, and it defines 
the binding using multiple <mime:content...> elements. The code sems to work 
with either of these wsdl approaches.

As far as I can tell, the wsdl you're trying to use is compliant with the 
spec. Although the examples in the text of the W3C Note take an approach 
different from either of the above two apparoaches, the WSDL schema in the 
Note says that for <input...> and <output...> elements, the name attribute 
is optional and the message atribute is required. (Interestngly, neither the 
wsdl Davanum points to nor the wsdl examples in the W3C Note follow this, as 
the former has <input...> elements n the bindings section with only a name 
attribute, and the latter has them with no atributes.)

So it seems to me that the non-compliant wsdls are working and the compliant 
one is not. I guess I still need to write a bug report. It'll hold off for a 
little while, in case someone can find something I'm missing. For example, 
does the problem lie with Axis because a valid wsdl file fails? I think so, 
but maybe there's some other factor at work that I'm missing. Hope this 
helps. (If you want me to send you the modified wsdl that worked for me, let 
me know.)

-Mark


>From: "Mark Leone" <markleone923@hotmail.com>
>Reply-To: axis-user@ws.apache.org
>To: axis-user@ws.apache.org
>Subject: RE: Beginners help
>Date: Wed, 14 Apr 2004 02:24:38 -0400
>
>I put some debug statements into the class that's throwing this Exception 
>(org.apache.axis.wsdl.symbolTable.SymbolTable). I found something 
>interesting.
>
>It looks like there is no problem with the operations in the binding. The 
>Exception is thrown when the code is checking that each binding operation 
>has a corresponding PortType operation. So I put some debug statements in 
>the code that iterates through the PortType operations, checking that 
>they're valid (i.e. not null). I found the following problem, which only 
>occurs for the three operations that have messages with mime parts in them 
>(Send, FaxReceive, and Status):
>
>As the code is iterating through the operations of the PortType, it finds 
>two instances of each of the three problematic operations. The first 
>instance has input and output messages with the proper parts, per the wsdl. 
>However, the second instance has no input or output message associated with 
>it (throws null pointer exception on getInput() and getOutput()). I guess 
>the method that checks the PortType operations against the Binding 
>operations is retrieving the defective instance of the PortType operation.
>
>Here's the output of my debug code, showing the operations, messages, and 
>parts for the IXMLWS PortType. Not sure why this is happening, but the fact 
>that it only occurs for messages with mime parts is a clue. Sure looks like 
>a bug to me. Can someone validate that assessment before I submit a bug 
>report?
>
>*********************************************************************
>PortType = {http://tempuri.org/}IXMLWS
>*********************************************************************
>********************************************************		*************
>Operation = Register
>Input Message = {http://tempuri.org/}Register0Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=RegData
>typeName={http://www.borland.com/namespaces/Types}TStringDynArray
>Output Message = {http://tempuri.org/}Register0Response
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = Send
>Input Message = {http://tempuri.org/}Send1Request
>Part = Part: name=Schalter
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=SendFile1
>typeName={http://www.w3.org/2001/XMLSchema}base64Binary
>Part = Part: name=SendFile3
>typeName={http://www.w3.org/2001/XMLSchema}base64Binary
>Part = Part: name=SendText
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=SendFile2
>typeName={http://www.w3.org/2001/XMLSchema}base64Binary
>Part = Part: name=JobArt
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=EmpfaengerListe
>typeName={http://www.w3.org/2001/XMLSchema}base64Binary
>Part = Part: name=EmpfaengerNr
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=SendeDatumZeit
>typeName={http://www.w3.org/2001/XMLSchema}dateTime
>Output Message = {http://tempuri.org/}Send1Response
>Part = Part: name=AnzahlSeiten
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=CheckDocFile
>typeName={http://www.w3.org/2001/XMLSchema}base64Binary
>Part = Part: name=JobId
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=AnzahlEmpfaenger
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = FaxReceive
>Input Message = {http://tempuri.org/}FaxReceive2Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}FaxReceive2Response
>Part = Part: name=FaxImage
>typeName={http://www.w3.org/2001/XMLSchema}base64Binary
>Part = Part: name=ReceiveDate
>typeName={http://www.w3.org/2001/XMLSchema}dateTime
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=FaxFile
>typeName={http://www.w3.org/2001/XMLSchema}string
>********************************************************		*************
>********************************************************		*************
>Operation = FaxDelete
>Input Message = {http://tempuri.org/}FaxDelete3Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=FaxFile
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}FaxDelete3Response
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = Status
>Input Message = {http://tempuri.org/}Status4Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=JobId
>typeName={http://www.w3.org/2001/XMLSchema}int
>Output Message = {http://tempuri.org/}Status4Response
>Part = Part: name=Protokoll
>typeName={http://www.w3.org/2001/XMLSchema}base64Binary
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = Journal
>Input Message = {http://tempuri.org/}Journal5Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Offset
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=AnzLines
>typeName={http://www.w3.org/2001/XMLSchema}int
>Output Message = {http://tempuri.org/}Journal5Response
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=JournalTab
>typeName={http://www.borland.com/namespaces/Types}TStringDynArray
>********************************************************		*************
>********************************************************		*************
>Operation = Kundenname
>Input Message = {http://tempuri.org/}Kundenname6Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}Kundenname6Response
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=KdName
>typeName={http://www.w3.org/2001/XMLSchema}string
>********************************************************		*************
>********************************************************		*************
>Operation = Kundendaten
>Input Message = {http://tempuri.org/}Kundendaten7Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}Kundendaten7Response
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>Part = Part: name=KdDaten
>typeName={http://www.borland.com/namespaces/Types}TStringDynArray
>********************************************************		*************
>********************************************************		*************
>Operation = KundenAccount
>Input Message = {http://tempuri.org/}KundenAccount8Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}KundenAccount8Response
>Part = Part: name=AccountData
>typeName={http://www.borland.com/namespaces/Types}TStringDynArray
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = SendWelcomeMail
>Input Message = {http://tempuri.org/}SendWelcomeMail9Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}SendWelcomeMail9Response
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = SetPassword
>Input Message = {http://tempuri.org/}SetPassword10Request
>Part = Part: name=OldPassword
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=NewPassword
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}SetPassword10Response
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = Kontostand
>Input Message = {http://tempuri.org/}Kontostand11Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=Password
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}Kontostand11Response
>Part = Part: name=KdKontostand
>typeName={http://www.w3.org/2001/XMLSchema}double
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = CheckPromoCode
>Input Message = {http://tempuri.org/}CheckPromoCode12Request
>Part = Part: name=Account
>typeName={http://www.w3.org/2001/XMLSchema}string
>Part = Part: name=PromoCode
>typeName={http://www.w3.org/2001/XMLSchema}string
>Output Message = {http://tempuri.org/}CheckPromoCode12Response
>Part = Part: name=return
>typeName={http://www.w3.org/2001/XMLSchema}int
>********************************************************		*************
>********************************************************		*************
>Operation = Send
>java.lang.NullPointerException
>********************************************************		*************
>Operation = FaxReceive
>java.lang.NullPointerException
>********************************************************		*************
>Operation = Status
>java.lang.NullPointerException
>
>
>>From: "Steffen Heil" <lists@steffen-heil.de>
>>Reply-To: axis-user@ws.apache.org
>>To: <axis-user@ws.apache.org>
>>Subject: Beginners help
>>Date: Sun, 11 Apr 2004 20:08:48 +0200
>>
>>Hi
>>
>>I am very new to this, and I need to implement a SOAP client in Java.
>>I do have the wsdl, but it seems to be incorrect. Anyway, I cannot change
>>this.
>>
>>WSDL2Java tells me:
>>[axis-wsdl2java] java.io.IOException: Binding operation has no 
>>corresponding
>>portType operation:  name = Send, input name = Send1Request, output name =
>>Send1Response
>>
>>Checking the WSDL file in XMLSpy gives me:
>>Extensible Object: a mime:part only allows you to use mime extensibility 
>>or
>>soap:body, as child items
>>
>>Anyway, I cannot even find the error in the wsdl.
>>XMLSpy seems to think there error is here:
>><mime:multipartRelated>
>>	...
>>	<mime:part>
>>		<mime:content part="SendFile3" type="application/binary"/>
>>	</mime:part>
>></mime:multipartRelated>
>>
>>The wsdl-File is here:
>>http://ccs.fax.de/xmlws.exe/wsdl/IXMLWS
>>
>>Can someone tell me, what's wrong, or what I can do?
>>Or simply a hint, where to search for more information?
>>
>>Regards,
>>   Steffen
>>
>
>_________________________________________________________________
>Get rid of annoying pop-up ads with the new MSN Toolbar – FREE! 
>http://toolbar.msn.com/go/onm00200414ave/direct/01/
>

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


Mime
View raw message