You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "St-Germain, Sylvain" <Sy...@cognos.com> on 2002/12/04 21:01:08 UTC

RE: SOAP header and patching problem

I have a patch on the way, only the test case has to be finalized... I can
send it to you.



-----Original Message-----
From: Julia Tertyshnaya [mailto:tertyshnaya@ftw.at]
Sent: Tuesday, November 26, 2002 5:57 AM
To: axis-user@xml.apache.org
Subject: SOAP header and patching problem



Hello all,

Sorry I sent the message in HTML format by mistake at first, this is the
text only.

I have problems with SOAP headers: I can create a SOAP header on the client
side and pack it into the SOAP envelope (using SOAPHeaderElement and
call.addHeader()), but my web service doesn't see the header.
I use Axis 1.0, Java 1.4 Tomcat 4.0.4.
I provide relevant fragments of client and service code below.
I've read everything I could find on this topic in this mailing list, tried
many things, but nothing helped until now. I did:
-changed service wsdl file in order it contains soap:header in binding (I
provide wsdl fragment later);
- tried to patch Axis with the patch
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13618 
but patch program (patch-2.5.7-alpha from GNUWin32) doesn't patch it
correctly and class JavaStubWriter doesn't compile. When I correct it
manually it doesn't compile as well because of incorrect signature of
writeOperation method: 

JavaStubWriter.java:308:
writeOperation(java.io.PrintWriter,javax.wsdl.BindingOperation,org.apache..a
x
is.wsdl.symbolTable.Parameters,java.lang.String,java.lang.String,boolean) in
org.apache.axis.wsdl.toJ
ava.JavaStubWriter cannot be applied to
(java.io.PrintWriter,javax.wsdl.BindingOperation,org.apache.a
xis.wsdl.symbolTable.Headers,org.apache.axis.wsdl.symbolTable.Parameters,jav
a.lang.String,java.lang.S
tring,boolean)
                writeOperation(pw, operation, headers, parameters,
soapAction, opStyle,
 
Do I really have to patch Axis in order to use Soap Headers or there's
another way? Could maybe somebody send me the patched class JavaStubWriter?

Please help me to understand what I'm doing wrong. 
Thank you very much.

Julia
*************************************************************************
Client code:

          String nameSpace = "samples.auth.SoapHeaderAuthClient";
          //Element root = doc.getDocumentElement();
          Element root = doc.createElementNS(nameSpace, "xxx");
          
          Element subElem = doc.createElementNS(nameSpace, "userName");
          //Element subElem = doc.createElement("userName");
          org.w3c.dom.Text text = doc.createTextNode("user1");
          subElem.appendChild(text);
          root.appendChild(subElem);
          
          subElem = doc.createElementNS(nameSpace, "password");
          //subElem = doc.createElement("password");
          text = doc.createTextNode("psw");
          subElem.appendChild(text);
          root.appendChild(subElem);
          
          org.apache.axis.message.SOAPHeaderElement head = new
org.apache.axis.message.SOAPHeaderElement(root);
          //head.setActor("SoapHeaderAuthService");
          head.setActor(SOAPConstants.URI_SOAP_ACTOR_NEXT);          
          head.setMustUnderstand(true);
          System.out.println("actor has been set " + head.getActor());
          System.out.println("must understand has been set " +
head.getMustUnderstand());
          
          String endpoint =
"http://localhost:9090/axis/services/SoapHeaderAuth";
          Service  service = new Service();
          Call call = (Call) service.createCall();
          call.setTargetEndpointAddress( new java.net.URL(endpoint) );
          call.setOperationName("sayHello");
          call.setReturnType( XMLType.XSD_STRING );
          call.addHeader(head);
          String res = (String)call.invoke( new Object [] {});


I can see Soap header with tcpmon in the Soap message
Although I set actor and "must understand" flag they are not visible in the
soap header at tcpmon. Why?

**************************************************************************
Service code:

 public String sayHello(){
        String s = "hello, ";
        try{
            MessageContext cox = MessageContext.getCurrentContext();
            SOAPMessage mess = cox.getMessage();
            System.out.println("got message context");
            javax.xml.soap.SOAPPart part = mess.getSOAPPart();
            System.out.println("got soap part");
            SOAPEnvelope env = part.getEnvelope();
            System.out.println("got envelope");
            SOAPHeader header = env.getHeader();
            System.out.println("got header");
            //Iterator it = header.examineHeaderElements("");
            //Iterator it =
header.examineHeaderElements("SoapHeaderAuthService");
            Iterator it =
header.examineHeaderElements(SOAPConstants.URI_SOAP_ACTOR_NEXT);
            System.out.println("got iterator " + it);
            if (it.hasNext())
                System.out.println("there's some header!");
            else 
                System.out.println("there's no header");
            while (it.hasNext()){
                SOAPHeaderElement el = (SOAPHeaderElement)it.next();
                System.out.println("got header element" + el);
            } 
            
        }catch (SOAPException e){
            e.printStackTrace();
        }
        return s;
    }

I get "there's no header" output
***********************************************************************
wsdl file:

<?xml version="1.0" encoding="UTF-8" ?> 
<wsdl:definitions
targetNamespace="http://localhost:8080/axis/services/SoapHeaderAuth/axis/ser
vices/SoapHeaderAuth" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services
/SoapHeaderAuth-impl"
xmlns:intf="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services
/SoapHeaderAuth" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="sayHelloResponse">
  <wsdl:part name="return" type="xsd:string" /> 
  </wsdl:message>
  <wsdl:message name="sayHelloRequest" /> 
 <wsdl:message name="header">
   <part name="userName" type="xsd:string" />
   <part name="password" type="xsd:string" />
 </wsdl:message>
<wsdl:portType name="SoapHeaderAuthService">
<wsdl:operation name="sayHello">
  <wsdl:input message="intf:sayHelloRequest" name="sayHelloRequest" /> 
  <wsdl:output message="intf:sayHelloResponse" name="sayHelloResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
<wsdl:binding name="SoapHeaderAuthSoapBinding"
type="intf:SoapHeaderAuthService">
  <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" /> 
<wsdl:operation name="sayHello">
  <wsdlsoap:operation soapAction="" /> 
<wsdl:input name="sayHelloRequest">
  <wsdlsoap:header message="header"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/
SoapHeaderAuth" use="encoded" /> 
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/
SoapHeaderAuth" use="encoded" /> 
  </wsdl:input>
<wsdl:output name="sayHelloResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/
SoapHeaderAuth" use="encoded" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
<wsdl:service name="SoapHeaderAuthServiceService">
<wsdl:port binding="intf:SoapHeaderAuthSoapBinding" name="SoapHeaderAuth">
  <wsdlsoap:address
location="http://localhost:8080/axis/services/SoapHeaderAuth" /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

When I compile this file, no soap header support is generated (which is
normal behaivor withou patch, I guess).
How can I use soap headers implicitly? Do I need to modify the wsdl file in
that case?



------extPart_000_007B_01C29542.EC33E7C0
Content-Type: text/html;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4616.200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hello all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Sorry I sent the message in HTML format by
mistake 
at first, this is the text only.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have problems with SOAP headers: I can create
a 
SOAP header on the client side and pack it into the SOAP envelope (using 
SOAPHeaderElement and call.addHeader()), but my web service doesn't see the 
header.</FONT></DIV>
<DIV><FONT face=Arial size=2>I use Axis 1.0, Java 1.4 Tomcat
4.0.4.</FONT></DIV>
<DIV><FONT face=Arial size=2>I provide relevant fragments of client and
service 
code below.</FONT></DIV>
<DIV><FONT face=Arial size=2>I've read everything I could find on this topic
in 
this mailing list, tried many things, but nothing helped until now. I 
did:</FONT></DIV>
<DIV><FONT face=Arial size=2>-changed service wsdl file in order it contains

soap:header in binding (I provide wsdl fragment later);</FONT></DIV>
<DIV><FONT face=Arial size=2>- tried to patch Axis with the patch <A 
href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13618"><FONT 
size=3>http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13618</FONT></A><FO
NT 
size=3> </FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>but patch program (patch-2.5.7-alpha from
GNUWin32) 
doesn't patch it correctly and class JavaStubWriter doesn't compile. When I 
correct it manually it doesn't compile as well because of incorrect
signature of 
writeOperation method: </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>JavaStubWriter.java:308: 
writeOperation(java.io.PrintWriter,javax.wsdl.BindingOperation,org.apache
boolean) 
in org.apache.axis.wsdl.toJ<BR>ava.JavaStubWriter cannot be applied to 
(java.io.PrintWriter,javax.wsdl.BindingOperation,org.apache.a<BR>xis.wsdl
ng.String,java.lang.S<BR>tring,boolean)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
writeOperation(pw, operation, headers, parameters, soapAction, 
opStyle,<BR>&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>Do I really have to patch Axis in order to use
Soap 
Headers or there's another way? Could maybe somebody send me the patched
class 
JavaStubWriter?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Please help me to understand what I'm doing
wrong. 
</FONT></DIV>
<DIV><FONT face=Arial size=2>Thank you very much.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Julia</FONT></DIV>
<DIV><FONT face=Arial 
size=2>*********************************************************************
****</FONT></DIV>
<DIV><FONT face=Arial size=2>Client code:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String
nameSpace = 
"samples.auth.SoapHeaderAuthClient";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 
//Element root = 
doc.getDocumentElement();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp; 
Element root = doc.createElementNS(nameSpace, 
"xxx");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Element subElem =

doc.createElementNS(nameSpace, 
"userName");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//Element 
subElem = 
doc.createElement("userName");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; 
org.w3c.dom.Text text = 
doc.createTextNode("user1");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp; 
subElem.appendChild(text);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp; 
root.appendChild(subElem);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subElem = 
doc.createElementNS(nameSpace, 
"password");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
//subElem 
= 
doc.createElement("password");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; 
text = 
doc.createTextNode("psw");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp; 
subElem.appendChild(text);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp; 
root.appendChild(subElem);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
org.apache.axis.message.SOAPHeaderElement head = new 
org.apache.axis.message.SOAPHeaderElement(root);<BR>&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
//head.setActor("SoapHeaderAuthService");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp; 
head.setActor(SOAPConstants.URI_SOAP_ACTOR_NEXT);&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
head.setMustUnderstand(true);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp; 
System.out.println("actor has been set " + 
head.getActor());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println("must understand has been set " + 
head.getMustUnderstand());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String endpoint =
"<A 
href="http://localhost:9090/axis/services/SoapHeaderAuth">http://localhost:9
090/axis/services/SoapHeaderAuth</A>";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp; 
Service&nbsp; service = new 
Service();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call
call = 
(Call) 
service.createCall();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp; 
call.setTargetEndpointAddress( new java.net.URL(endpoint) 
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
call.setOperationName("sayHello");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp; 
call.setReturnType( XMLType.XSD_STRING 
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
call.addHeader(head);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp; 
String res = (String)call.invoke( new Object [] {});</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I can see Soap header with tcpmon in the Soap 
message</FONT></DIV>
<DIV><FONT face=Arial size=2>Although I set actor and "must understand" flag

they are not visible&nbsp;in the soap header at tcpmon. Why?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>*********************************************************************
*****</FONT></DIV>
<DIV><FONT face=Arial size=2>Service code:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;public String 
sayHello(){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String s = "hello,

";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
try{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
MessageContext cox = 
MessageContext.getCurrentContext();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SOAPMessage mess = 
cox.getMessage();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp; 
System.out.println("got message 
context");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp; 
javax.xml.soap.SOAPPart part = 
mess.getSOAPPart();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp; 
System.out.println("got soap 
part");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
; 
SOAPEnvelope env = 
part.getEnvelope();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp; 
System.out.println("got 
envelope");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp; 
SOAPHeader header = 
env.getHeader();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp; 
System.out.println("got 
header");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp; 
//Iterator it = 
header.examineHeaderElements("");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp; 
//Iterator it = 
header.examineHeaderElements("SoapHeaderAuthService");<BR>&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Iterator it = 
header.examineHeaderElements(SOAPConstants.URI_SOAP_ACTOR_NEXT);<BR>&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println("got iterator " + 
it);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
if 
(it.hasNext())<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println("there's some 
header!");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp; 
else 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 
System.out.println("there's no 
header");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp; 
while 
(it.hasNext()){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SOAPHeaderElement el = 
(SOAPHeaderElement)it.next();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
System.out.println("got header element" + 
el);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }catch (SOAPException 
e){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
e.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return
s;<BR>&nbsp;&nbsp;&nbsp; 
}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I get "there's no header" output</FONT></DIV>
<DIV><FONT face=Arial 
size=2>*********************************************************************
**</FONT></DIV>
<DIV><FONT face=Arial size=2>wsdl file:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&lt;?xml version="1.0" encoding="UTF-8" ?&gt; 
<BR>&lt;wsdl:definitions targetNamespace="<A 
href="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/SoapH
eaderAuth">http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/
SoapHeaderAuth</A>" 
xmlns="<A 
href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</A>
" 
xmlns:apachesoap="<A 
href="http://xml.apache.org/xml-soap">http://xml.apache.org/xml-soap</A>" 
xmlns:impl="<A 
href="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/SoapH
eaderAuth-impl">http://localhost:8080/axis/services/SoapHeaderAuth/axis/serv
ices/SoapHeaderAuth-impl</A>" 
xmlns:intf="<A 
href="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/SoapH
eaderAuth">http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/
SoapHeaderAuth</A>" 
xmlns:soapenc="<A 
href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap
xmlns:wsdl="<A 
href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</A>
" 
xmlns:wsdlsoap="<A 
href="http://schemas.xmlsoap.org/wsdl/soap/">http://schemas.xmlsoap.org/wsdl
/soap/</A>" 
xmlns:xsd="<A 
href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</A>
"&gt;<BR>&lt;wsdl:message 
name="sayHelloResponse"&gt;<BR>&nbsp; &lt;wsdl:part name="return" 
type="xsd:string" /&gt; <BR>&nbsp; &lt;/wsdl:message&gt;<BR>&nbsp; 
&lt;wsdl:message name="sayHelloRequest" /&gt; <BR>&nbsp;&lt;wsdl:message 
name="header"&gt;<BR>&nbsp;&nbsp; &lt;part name="userName" type="xsd:string"

/&gt;<BR>&nbsp;&nbsp; &lt;part name="password" type="xsd:string" 
/&gt;<BR>&nbsp;&lt;/wsdl:message&gt;<BR>&lt;wsdl:portType 
name="SoapHeaderAuthService"&gt;<BR>&lt;wsdl:operation 
name="sayHello"&gt;<BR>&nbsp; &lt;wsdl:input message="intf:sayHelloRequest" 
name="sayHelloRequest" /&gt; <BR>&nbsp; &lt;wsdl:output 
message="intf:sayHelloResponse" name="sayHelloResponse" /&gt; <BR>&nbsp; 
&lt;/wsdl:operation&gt;<BR>&nbsp; &lt;/wsdl:portType&gt;<BR>&lt;wsdl:binding

name="SoapHeaderAuthSoapBinding"
type="intf:SoapHeaderAuthService"&gt;<BR>&nbsp; 
&lt;wsdlsoap:binding style="rpc" transport="<A 
href="http://schemas.xmlsoap.org/soap/http">http://schemas.xmlsoap.org/soap/
http</A>" 
/&gt; <BR>&lt;wsdl:operation name="sayHello"&gt;<BR>&nbsp; 
&lt;wsdlsoap:operation soapAction="" /&gt; <BR>&lt;wsdl:input 
name="sayHelloRequest"&gt;<BR>&nbsp; &lt;wsdlsoap:header message="header" 
encodingStyle="<A 
href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap
namespace="<A 
href="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/SoapH
eaderAuth">http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/
SoapHeaderAuth</A>" 
use="encoded" /&gt; <BR>&nbsp; &lt;wsdlsoap:body encodingStyle="<A 
href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap
namespace="<A 
href="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/SoapH
eaderAuth">http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/
SoapHeaderAuth</A>" 
use="encoded" /&gt; <BR>&nbsp; &lt;/wsdl:input&gt;<BR>&lt;wsdl:output 
name="sayHelloResponse"&gt;<BR>&nbsp; &lt;wsdlsoap:body encodingStyle="<A 
href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap
namespace="<A 
href="http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/SoapH
eaderAuth">http://localhost:8080/axis/services/SoapHeaderAuth/axis/services/
SoapHeaderAuth</A>" 
use="encoded" /&gt; <BR>&nbsp; &lt;/wsdl:output&gt;<BR>&nbsp; 
&lt;/wsdl:operation&gt;<BR>&nbsp; &lt;/wsdl:binding&gt;<BR>&lt;wsdl:service 
name="SoapHeaderAuthServiceService"&gt;<BR>&lt;wsdl:port 
binding="intf:SoapHeaderAuthSoapBinding" name="SoapHeaderAuth"&gt;<BR>&nbsp;

&lt;wsdlsoap:address location="<A 
href="http://localhost:8080/axis/services/SoapHeaderAuth">http://localhost:8
080/axis/services/SoapHeaderAuth</A>" 
/&gt; <BR>&nbsp; &lt;/wsdl:port&gt;<BR>&nbsp;
&lt;/wsdl:service&gt;<BR>&nbsp; 
&lt;/wsdl:definitions&gt;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>When I compile this file, no soap header
support is 
generated (which is normal behaivor withou patch, I guess).</FONT></DIV>
<DIV><FONT face=Arial size=2>How can I use soap headers implicitly? Do I
need to 
modify the wsdl file in that case?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>





This message may contain privileged and/or confidential information.  If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.  Thank you.