Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > BOOK: Professional XML Development with Apache Tools
|
BOOK: Professional XML Development with Apache Tools
This is the forum to discuss the Wrox book Professional XML Development with Apache Tools: Xerces, Xalan, FOP, Cocoon, Axis, Xindice by Theodore W. Leung; ISBN: 9780764543555
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional XML Development with Apache Tools section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2007, 05:19 AM
Registered User
 
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to remove actor from axis header element

The web service call I am making from my WS client produces error because of actor in the axis header element. I create the header in my code but, removing the actor using removeActor() produces a null pointer exception (since it was never set) however, axis automatically sets a default actor on making the actual WS call. Any help will be valuable.

Regards,
Ashish

I am using axis 1.4
My config.wsdd :
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
 <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSen der"/>
<globalConfiguration >
   <requestFlow >
    <handler type="java:org.apache.ws.axis.security.WSDoAllSend er" >
    <parameter name="action" value="UsernameToken"/>
     <parameter name="user" value="USERNAME"/>
     <parameter name="passwordCallbackClass" value="xxx.yyy.PWCallback"/>
     <parameter name="passwordType" value="PasswordText"/>
     <parameter name="mustUnderstand" value="true"/>
    </handler>
   </requestFlow>
</globalConfiguration>
</deployment>
My Java code :
OrderSubscriptions_Service orderSubService = new OrderSubscriptions_ServiceLocator();
            orderSubscriptionsWSPort = orderSubService.getOrderSubscriptionsHttpPort();
            SOAPHeaderElement soapHeaderElement = new SOAPHeaderElement("http://order.ws.smi.fsecure.com/",XXX);
            soapHeaderElement.addTextNode(customerId);

            ((org.apache.axis.client.Stub)orderSubscriptionsWS Port).setHeader(soapHeaderElement);
            ((org.apache.axis.client.Stub)orderSubscriptionsWS Port).setTimeout(timeout)
My input SOAP message generated by java axis client (using axis 1.4):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema­instance">
 <soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis­open.org/wss/2004/01/oasis­200401­wss­wssecurity­secext­1.0.xsd"
soapenv:mustUnderstand="1"><wsse:UsernameToken xmlns:wsu="http://docs.oasis­open.org/wss/2004/01/oasis­200401­wss­wssecurity­utility­1.0.xsd"
wsu:Id="UsernameToken­25383640"><wsse:Username>US ERNAME</wsse:Username><wsse:Password Type="http://docs.oasis­open.org/wss/2004/01/oasis­200401­
wss­username­token­profile­1.0#PasswordText">P ASSWORD</wsse:Password></wsse:UsernameToken></wsse:Security>
  <ns1:customerId xmlns:ns1="http://order.ws.smi.fsecure.com/" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0">XXX</ns1:customerId>
 </soapenv:Header>
 <soapenv:Body>
  <getContinuousSubscriptions xmlns="http://order.ws.smi.fsecure.com">
   <orderContinuousRequest>
    <amount>1</amount>
    <licenseSize>5</licenseSize>
    <product>InternetSecurity</product>
    <tag>inty</tag>
   </orderContinuousRequest>
  </getContinuousSubscriptions>
 </soapenv:Body>
</soapenv:Envelope>
Expected format :
<soapenv:Envelope xmlns:ord="http://order.ws.smi.fsecure.com" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis­open.org/wss/2004/01/oasis­200401­wss­wssecurity­secext­1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken­27708485" xmlns:wsu="http://docs.oasis­open.org/wss/2004/01/oasis­200401­wss­wssecurity­utility­1.0.xsd">
            <wsse:Username>USER</wsse:Username>
            <wsse:Password Type="http://docs.oasis­open.org/wss/2004/01/oasis­200401­wss­username­token­profile­1.0# PasswordText">PASSWORD</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
      <ord:customerId>XXX</ord:customerId>
   </soapenv:Header>
   <soapenv:Body>
      <ord:getContinuousSubscriptions>
         <ord:orderContinuousRequest>
            <ord:amount>1</ord:amount>
            <ord:licenseSize>5</ord:licenseSize>
            <ord:product>InternetSecurity</ord:product>
            <!­­Optional:­­>
            <ord:tag>YYYY</ord:tag>
         </ord:orderContinuousRequest>
      </ord:getContinuousSubscriptions>
   </soapenv:Body>
</soapenv:Envelope>


 
Old August 15th, 2007, 12:18 PM
Registered User
 
Join Date: Aug 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi -

Did you ever find the solution to suppressing the "actor" attribute? I am haveing the same problem.

- Dave Levitt
[email protected]
 
Old August 15th, 2007, 12:20 PM
Registered User
 
Join Date: Aug 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi -

Did you ever find the solution to suppressing the "actor" attribute? I am having the same problem.

- Dave Levitt
[email protected]
 
Old November 25th, 2007, 03:51 PM
Registered User
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can you provide the client code you have for this ?

-- Suresh





Similar Threads
Thread Thread Starter Forum Replies Last Post
To remove the under line from the grid view header shalu .NET Framework 2.0 1 February 21st, 2008 07:31 AM
remove <div>-element Kabe Classic ASP Professional 0 November 9th, 2007 05:41 AM
xhtml, remove element Kabe XML 4 November 8th, 2007 12:09 PM
Remove Header and Trailer record??? gzura SQL Server DTS 2 April 27th, 2005 12:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.