Re: TCP Monitor

2005-04-26 Thread Jeff



BTW, I had assumed that you had a valid web service 
URL. The IIS server might be running independently of Tomcat/Axis and the web 
service may not even be hosted by Tomcat/Axis. You need to consult the web 
service documentation. IIS could be redirecting to Tomcat/Axis or some other web 
service hosting software and may or may not be doing that via port 80. If IIS is 
not redirecting then you need to connect directly to the listening port of the 
web service. In the case of Tomcat/Axis the default port is 8080, of course. 
Anyone setting up a web service on a port other than port 80 needs to ensure 
that if external clients are expected to connect from outside a firewall then 
the firewall is configured to permit access through that port.
 
 
Jeff
 
 

  - Original Message - 
  From: 
  Jeff 
  
  To: axis-user@ws.apache.org 
  Sent: Tuesday, April 26, 2005 11:43 
  PM
  Subject: Re: TCP Monitor
  
  James,
   
  TCPMonitor listens for connections at the 
  specified port on the machine on which it is running. This port is any free 
  port you know of or guess at, e.g.  is unlikely to be in use. The 
  client-side software must be configured to use the TCPMonitor by replacing the 
  target host name and port (which could just be the default port 80). Here's 
  what to do, assuming that TCPMonitor will be running on the same computer as 
  the client software (if it isn't then change 127.0.0.1 that appears below for 
  the host name or IP address of the machine running TCPMonitor):
   
      - Pick a port number for 
  TCPMonitor to listen on, let's suppose it's .
   
      - Make a note of the target 
  host name (or IP address) plus the port number of the target web 
  service.
          E.g. 
  for  http://services.xmethods.net/soap/servlet/rpcrouter  
  the host name is services.xmethods.net and the port number is 80.
          E.g. 
  for  http://10.0.0.12:8080/axis/services/ScsServiceSoap  
  the IP address is 10.0.0.12 and the port number is 8080.
   
      - Now change the target web 
  service URL in the client-side code to point to TCPMonitor.
  
          E.g. 
   http://services.xmethods.net/soap/servlet/rpcrouter  
  becomes  http://127.0.0.1:/soap/servlet/rpcrouter
          E.g. 
   http://10.0.0.12:8080/axis/services/ScsServiceSoap  becomes  
  http://127.0.0.1:/axis/services/ScsServiceSoap
   
      - Recompile the client-side 
  code.
   
      - Start TCPMonitor and enter 
  the Listen Port # as . Enter the appropriate Target Hostname and the 
  Target Port # as noted in the second step
  
  
          E.g. 
  for  http://services.xmethods.net/soap/servlet/rpcrouter  
  Target Hostname is  services.xmethods.net  and the Target Port # 
  is  80
          E.g. 
  for  http://10.0.0.12:8080/axis/services/ScsServiceSoap  Target 
  Hostname is  10.0.0.12  and the Target Port # is  
  8080
   
      - After entering the correct data, start TCPMonitor 
  listening by clicking the Add button.
   
      - Run the client software and watch TCPMonitor for 
  activity.
   
   
  Jeff
   
   
  
- Original Message - 
From: 
James 
Chiu 
To: axis-user@ws.apache.org 
Sent: Tuesday, April 26, 2005 7:06 
PM
Subject: TCP Monitor


Hi,
 
I like to use tcpmon to see 
outgoing messages and incoming messages of my java WS client. The server 
side is hosted by Microsoft IIS.
I am not sure the exact 
arguments (listenPort 
targetHost targetPort) in this case. 

What is the listen 
port?
I assume the targetHost is the 
machine of the server side.
I think the targetPort is 80 by 
default in IIS.
 
Thanks for your 
help,
 
James


Re: TCP Monitor

2005-04-26 Thread Jeff



James,
 
TCPMonitor listens for connections at the specified 
port on the machine on which it is running. This port is any free port you know 
of or guess at, e.g.  is unlikely to be in use. The client-side software 
must be configured to use the TCPMonitor by replacing the target host name and 
port (which could just be the default port 80). Here's what to do, assuming that 
TCPMonitor will be running on the same computer as the client software (if it 
isn't then change 127.0.0.1 that appears below for the host name or IP address 
of the machine running TCPMonitor):
 
    - Pick a port number for 
TCPMonitor to listen on, let's suppose it's .
 
    - Make a note of the target host 
name (or IP address) plus the port number of the target web 
service.
        E.g. 
for  http://services.xmethods.net/soap/servlet/rpcrouter  
the host name is services.xmethods.net and the port number is 80.
        E.g. 
for  http://10.0.0.12:8080/axis/services/ScsServiceSoap  
the IP address is 10.0.0.12 and the port number is 8080.
 
    - Now change the target web 
service URL in the client-side code to point to TCPMonitor.

        E.g.  http://services.xmethods.net/soap/servlet/rpcrouter  
becomes  http://127.0.0.1:/soap/servlet/rpcrouter
        E.g.  http://10.0.0.12:8080/axis/services/ScsServiceSoap  becomes  
http://127.0.0.1:/axis/services/ScsServiceSoap
 
    - Recompile the client-side 
code.
 
    - Start TCPMonitor and enter the 
Listen Port # as . Enter the appropriate Target Hostname and the Target Port 
# as noted in the second step


        E.g. 
for  http://services.xmethods.net/soap/servlet/rpcrouter  
Target Hostname is  services.xmethods.net  and the Target Port # 
is  80
        E.g. 
for  http://10.0.0.12:8080/axis/services/ScsServiceSoap  Target 
Hostname is  10.0.0.12  and the Target Port # is  
8080
 
    - After entering the correct data, start TCPMonitor 
listening by clicking the Add button.
 
    - Run the client software and watch TCPMonitor for 
activity.
 
 
Jeff
 
 

  - Original Message - 
  From: 
  James Chiu 
  
  To: axis-user@ws.apache.org 
  Sent: Tuesday, April 26, 2005 7:06 
  PM
  Subject: TCP Monitor
  
  
  Hi,
   
  I like to use tcpmon to see 
  outgoing messages and incoming messages of my java WS client. The server side 
  is hosted by Microsoft IIS.
  I am not sure the exact arguments 
  (listenPort targetHost 
  targetPort) in this case. 
  What is the listen 
  port?
  I assume the targetHost is the 
  machine of the server side.
  I think the targetPort is 80 by 
  default in IIS.
   
  Thanks for your 
  help,
   
  James


Sending array of complex types from Axis to .Net

2005-04-26 Thread Schmidt, Tom
Title: Sending array of complex types from Axis to .Net





I've seen a lot of discussion on the mailing list about sending arrays of complex types from Axis to .Net.  I'm having the opposite problem, I'm trying to send an array of complex types from a .Net client to an Axis server.  The server appears to deserialize the array correctly, but all the values of the complex type are blank.  I'm assuming it's a problem with how .Net is encoding the complex type.  Can anyone tell me where to start?  I am using Axis 1.2RC3.  I am not very familiar with WSDL and am letting access generate the WSDL from my java class.

Thanks,


Tom.





TCP Monitor

2005-04-26 Thread James Chiu








Hi,

 

I like to use tcpmon to see outgoing messages and incoming
messages of my java WS client. The server side is hosted by Microsoft IIS.

I am not sure the exact arguments (listenPort targetHost targetPort) in this
case. 

What is the listen port?

I assume the targetHost is the machine of the server side.

I think the targetPort is 80 by default in IIS.

 

Thanks for your help,

 

James








RemoteException: java.lang.NullPointerException

2005-04-26 Thread James Chiu
Hi,

I received a RemoteException: java.lang.NullPointerException after my client
makes a WS method call. I used the WSDL2Java utility to create client stub
classes. The server side is hosted by Microsoft IIS. I turned on the
debugger and found where the exception is thrown as following:

  {http://xml.apache.org/axis/}stackTrace:
java.lang.NullPointerException
  at java.util.Hashtable.put(Hashtable.java:396)
  at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserI
mpl.java:395)
  at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:246)
  at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
  at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
  at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:675
)
  at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
  at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:
71)
  at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
  at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
  at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
  at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
  at org.apache.axis.client.Call.invoke(Call.java:2553)
  at org.apache.axis.client.Call.invoke(Call.java:2248)
  at org.apache.axis.client.Call.invoke(Call.java:2171)
  at org.apache.axis.client.Call.invoke(Call.java:1691)
  at
com.microsoft.schemas.sqlserver._2003._12.reporting.reportingservices.Report
ingServiceSoapStub.listSecureMethods(ReportingServiceSoapStub.java:1703)
  at
responsys.advrpt.msrsclient.MSRSClient.getChildrenList(MSRSClient.java:54)
  at responsys.advrpt.msrsclient.MSRSClient.main(MSRSClient.java:116)

I also checked the XML sent and the XML received. The debugging message
shows that the HTTP content of the XML sent is null and the XML received is
nothing as following:

- XML sent:
- ---
- ---
- POST /ReportServer/ReportService.asmx HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.1
Host: testshabd
Cache-Control: no-cache
Pragma: no-cache
SOAPAction:
"http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices/
ListSecureMethods"
Content-Length: 373

Null

.

XML received:


Do you know what could be a problem?

Thanks a lot,

James




Re: obtaining consumer IP

2005-04-26 Thread Tim K. (Gmane)
From the MessageContext you can get the HttpServletRequest and from 
that the IP:

HttpServletRequest req = (HttpServletRequest) 
msgContext.getProperty(org.apache.axis.transport.http.HTTPConstants.MC_HTTP_SERVLETREQUEST);

String ip = req.getRemoteAddr();
However, keep in mind that the IP address may be misleading if the 
client is going through a proxy or you have a load balancer in front of 
your server or a caching server, etc. I know in a real production system 
you will most likely get a local IP address.  Also, if you want to do 
security based on the IP address, keep in mind that IP addresses can be 
easily spoofed. For this reason I find relying on the IP address to be a 
bad plan.

Tim

Robert Gombotz wrote:
Hi!
I would need to obtain the IP address of clients/consumers that make
calls to my Web services, preferably using a SOAP handler.
So far, I have not found a way of achieving this. The MessageContext
seems to be the only data I have in a handler, and from what I
understand it does not contain the client's IP.
Any hints and ideas are greatly appreciated.
Rob
 




obtaining consumer IP

2005-04-26 Thread Robert Gombotz
Hi!


I would need to obtain the IP address of clients/consumers that make
calls to my Web services, preferably using a SOAP handler.
So far, I have not found a way of achieving this. The MessageContext
seems to be the only data I have in a handler, and from what I
understand it does not contain the client's IP.

Any hints and ideas are greatly appreciated.


Rob


RE: Axis 1.1 vs Axis 1.2rc3 and derived types

2005-04-26 Thread Dovholuk, Clint
thanks dims,

bug 1955 created : http://issues.apache.org/jira/browse/AXIS-1955

-clint

(posted to the mailing list in case anyone else wants to view)



-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 26, 2005 3:26 PM
To: axis-user@ws.apache.org
Subject: Re: Axis 1.1 vs Axis 1.2rc3 and derived types

this is definitely looks like a bug. do you have a stripped down test
case that can be used to recreate the bug? (please open a bug report)

thanks,
dims

On 4/26/05, Dovholuk, Clint <[EMAIL PROTECTED]> wrote:
> Hello all,
> 
> We are trying to switch to Axis 1.2rc3 in order to move to J2SE 5.0 
> (unless there's another workaround for the package "enum" that I 
> didn't find?).
> 
> I have a web service which uses abstract classes/types but when I 
> switched to the axis 1.2rc3 jars, all of a sudden the wsdl that axis 
> creates is no longer representing many (mostly all) of the derived 
> classes... The abstract classes are still created but the classes 
> derived from the abstract class no longer get written to the wsdl...
> 
> If I expose another method to axis (via server-config.wsdd) in the 
> same class which uses the base type, only THEN will the derived types 
> get written to the wsdl properly...
> 
> I've searched through the mailing lists to the best of my ability but 
> I can't find this exact issue. Could anybody point me in the right 
> direction or has anybody seen similar issues?
> 
> I can provide some simple sample classes if people wish but every time

> I post a 'lengthy' message, I get no replies... :)
> 
> Thanks,
> -Clint
> 


--
Davanum Srinivas - http://webservices.apache.org/~dims/


Re: Axis 1.1 vs Axis 1.2rc3 and derived types

2005-04-26 Thread Davanum Srinivas
this is definitely looks like a bug. do you have a stripped down test
case that can be used to recreate the bug? (please open a bug report)

thanks,
dims

On 4/26/05, Dovholuk, Clint <[EMAIL PROTECTED]> wrote:
> Hello all,
> 
> We are trying to switch to Axis 1.2rc3 in order to move to J2SE 5.0
> (unless there's another workaround for the package "enum" that I didn't
> find?).
> 
> I have a web service which uses abstract classes/types but when I
> switched to the axis 1.2rc3 jars, all of a sudden the wsdl that axis
> creates is no longer representing many (mostly all) of the derived
> classes... The abstract classes are still created but the classes
> derived from the abstract class no longer get written to the wsdl...
> 
> If I expose another method to axis (via server-config.wsdd) in the same
> class which uses the base type, only THEN will the derived types get
> written to the wsdl properly...
> 
> I've searched through the mailing lists to the best of my ability but I
> can't find this exact issue. Could anybody point me in the right
> direction or has anybody seen similar issues?
> 
> I can provide some simple sample classes if people wish but every time I
> post a 'lengthy' message, I get no replies... :)
> 
> Thanks,
> -Clint
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/


WS-Security Binary Token Help Needed

2005-04-26 Thread Shawn McKinney

Need help learning how to insert/retrieve WS-Security
Binary Token into message using Axis handlers.

Surely someone has an example demonstrating a
technique for achieving this task using either WSS4J's
toolkit or some other means.

Any help/direction on this topic is most appreciated.

Regards,

Shawn


Re: Attachments [again]

2005-04-26 Thread Anne Thomas Manes
Did you check the attachments section in the Wiki?
http://wiki.apache.org/ws/FrontPage/Axis 

On 4/26/05, Tom Ziemer <[EMAIL PROTECTED]> wrote:
> Sorry to bother you again with the same question, but I am really stuck
> here.
> 
> I need to send a binary file from the server to a client, yet I am not
> sure where/when to actually add the attachment (on the server) and how
> to get access to the attachment on the client side.
> 
> So far I'm trying this:
> DataHandler dh = new DataHandler(new FileDataSource("/tmp/ws_expor.xls"));
>  SOAPMessageContext smc = (SOAPMessageContext)
> MessageContext.getCurrentContext();
>  boolean isNull = smc==null;
>  logger.info("is smc == null?"+isNull);
>  AttachmentPart ap = smc.getMessage().createAttachmentPart();
>  ap.setDataHandler(dh);
>  smc.getMessage().addAttachmentPart(ap);
> 
> Any answers or pointers to samples/documentation would be extremely helpful.
> 
> Thank you,
> 
> Tom
>


Axis 1.1 vs Axis 1.2rc3 and derived types

2005-04-26 Thread Dovholuk, Clint
Hello all,

We are trying to switch to Axis 1.2rc3 in order to move to J2SE 5.0
(unless there's another workaround for the package "enum" that I didn't
find?).

I have a web service which uses abstract classes/types but when I
switched to the axis 1.2rc3 jars, all of a sudden the wsdl that axis
creates is no longer representing many (mostly all) of the derived
classes... The abstract classes are still created but the classes
derived from the abstract class no longer get written to the wsdl...

If I expose another method to axis (via server-config.wsdd) in the same
class which uses the base type, only THEN will the derived types get
written to the wsdl properly...

I've searched through the mailing lists to the best of my ability but I
can't find this exact issue. Could anybody point me in the right
direction or has anybody seen similar issues?

I can provide some simple sample classes if people wish but every time I
post a 'lengthy' message, I get no replies... :)

Thanks,
-Clint


RE: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer exception

2005-04-26 Thread Timothy Thorpe

Anne

I have tracked my ongoing 'SimpleDeserializer' SAX exception down to my
'wrapped/literal' web service's handling of an expected Vector-type value in
the invoked web service 'addUser' method's parameter, which is of type
'HashMap'.

Is there a known problem at AXIS 1.1 when 'wrapped/literal' web services
have to handle Vector-type values within HashMap's ? 

If you could take a look at the attached 'tcpmon' trace of a
request/response between the original RPC/Encoded client/service
('TSMAdapter RPC Enc addUser.log ') you will see that there is an item
representing a Vector defined thus:
   
alias

   
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="ns3:Vector" xmlns:ns3="http://xml.apache.org/xml-soap";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
  

If you then take a look at the attached 'tcpmon' trace of a request/response
between the converted Wrapped/literal client/service ('TSMAdapter Wrapped
Lit addUser.log') you will see that the equivalent item representing a
Vector is defined thus:

 alias
 
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 

You will also then see the exception being returned in this trace.

I have checked that removal of this & all other such Vector-type values from
the 'hUserDtls' HashMap passed as a parameter by the client on the 'addUser'
invocation prevents the 'SimpleDeserializer' SAX exception.

Could you guide me as to what I need to do to get my 'wrapped/literal' web
service to handle such Vector-type values ?

Many Thanks,
Tim

-Original Message-
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: 19 April 2005 13:23
To: Timothy Thorpe; axis-user@ws.apache.org
Subject: Re: Converting RPC/Enc web service to RPC/Lit - SimpleDeserializer
exception

Tim,

The operation parameters you've specified in your WSDD are wrong. In
wrapped mode, your input parameters are the same as the operation
name.

Anne

On 4/19/05, Timothy Thorpe <[EMAIL PROTECTED]> wrote:
> Anne
> 
> I have read your blogger article & the wiki reference.
> 
> Thank you for the new WSDL.
> 
> I have supplied it to the AXIS 1.1 version of 'WSDLToJava' generate my
> client stub code, via the following command:
> >java org.apache.axis.wsdl.WSDL2Java
>
\Tomcat\jakarta-tomcat-4.1.30\webapps\TSMAdapter_wrapped\WEB-INF\classes\net
> \cp\adapter\TSMAdapter_wrapped.wsdl
> 
> I used two versions of WSDD file (both attached) to deploy my AXIS 1.1 web
> service, via the following command:
> >java org.apache.axis.client.AdminClient -lhttp://localhost:9249/TSMAda
> pter_wrapped/services/AdminService deploy.wsdd
> Processing file deploy.wsdd
> Done processing
> 
> Note in particular this line in the first WSDD file:
>   
> 
> Then a modified version of this line in the second WSDD file:
>   
> 
> Unfortunately, with the web service deployed using either version of the
> WSDD, I still get the same 'SimpleDeserializer' SAX exception - I have
> attached 'tcpmon' output of the failing request/response (also, for good
> measure, the equivalent 'tcpmon' output of the working request/response
for
> the RPC/Encoded version of the client/service).
> 
> Clearly I am doing something wrong here because wrapped/literal does work
> for AXIS 1.1.
> 
> I do appreciate the help you are giving me.
> 
> Thanks,
> Tim
> 
> 
> -Original Message-
> From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> Sent: 18 April 2005 23:21
> To: Timothy Thorpe
> Subject: Re: Converting RPC/Enc web service to RPC/Lit -
SimpleDeserializer
> exception
> 
> Here's a wrapped version of your WSDL:
> 
> 
>xmlns:impl="urn:TSMAdapter"
>   xmlns:intf="urn:TSMAdapter"
>   xmlns:apachesoap="http://xml.apache.org/xml-soap";
>   xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
>   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>   xmlns="http://schemas.xmlsoap.org/wsdl/";>
>  
>   http://www.w3.org/2001/XMLSchema";
> targetNamespace="http://xml.apache.org/xml-soap";>
> 
> 
>  
>  
> 
>
>
> 
>   type="apachesoap:mapItem"/>
> 
>
>   
>   http://www.w3.org/2001/XMLSchema";
> targetNamespace="urn:TSMAdapter">
>http://xml.apache.org/xml-soap"/>
>
> 
>  
>   type="xsd:string"/>
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 
>
>
> 
>  
>  
> 
>
>
>
>  
>
>  
>
>  
>
>
>  
>
>  
>
>  
>
>
>  
>
>  
>
>  
>
>
>  
>
>  
>
>  
>
>
>  
>
>  
>
>  
>
>
>  
>
>  
>
>  
>
>
>  
>
>  
>  
>
>  
>
>
>  
>
>  
> 

RE: communication between the Handler and the Service

2005-04-26 Thread Jeff Saremi
I think I'm getting a better understanding of the
problem. here' what i found so far:

- this problem is very much similar to what was
reported (and probably not fixed comprehensively) in
http://issues.apache.org/jira/browse/AXIS-283

- what XMLUtils produces and what SerializationContext
outputs are completely different. SC does not output
any changes that are in the memory!
Compare the following pieces after some modification
to one of the nodes in the body:
 // this one shows all my changes
  System.out.println(
  XMLUtils.ElementToString(env.getBody()));

 // however this one does not -- why?
 // this is very frustrating
  SerializationContext serContext = new
SerializationContext(new PrintWriter(System.out),
messageContext);
  serContext.setSendDecl(true);
  serContext.setEncoding("UTF-8");
  body.output(serContext);


Is this a bug? how can we report it if so?
thanks
jeff




 --- Jeff Saremi <[EMAIL PROTECTED]> wrote: 
> ashutosh, 
> thanks for taking the time to reply.
> I tried the test code and the resolution you had
> posted but it did not make any difference.
> 
> Then i went on to try the sample code you had and
> realized that i don't get the problem that was
> posted
> as a bug. I didn't even need to call
> setSOAPEnvelope()
> method. May be the issue is gone away in 1.2RC3.
> 
> However my problem still persists. My issue is that
> i
> don't want to add a new element to the body but
> rather
> i'd like to modify an existing one. See the code
> below. None of the saveChanges() or
> setSOAPEnvelope()
> or other method calls can make the modified body
> persist beyon the scope of the invoke() method in
> the
> handler:
> 
> public void invoke(MessageContext context) {
>   ...
>   Node someNode =   
>  
> body.getElementsByTagName("MyNodeName").item(0);
> 
>   someNode.appendChild(
> 
>   body.getOwnerDocument().createTextNode(
>   "someTextForMyNode"));
>   // print the body now
>   // the oputput includes the new text node
>  
> System.out.println(XMLUtils.ElementToString(body));
> 
>   // the body shows the modification correctly here
>   // however after the message is forwarded to the
> service
>   // you can no longer see the changes
> 
> 
> 
> 
> 
>  --- "Shahi, Ashutosh" <[EMAIL PROTECTED]>
> wrote: 
> > Jeff,
> >  I haven't gone through the entire discussion,
> > but the problem might
> > be linked to
> > http://issues.apache.org/jira/browse/AXIS-1469
> > See if it helps.
> > 
> > Thanks,
> > Ashutosh
> > 
> > -Original Message-
> > From: Jeff Saremi [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, April 25, 2005 8:47 PM
> > To: axis-user@ws.apache.org
> > Subject: Re: communication between the Handler and
> > the Service
> > 
> > It did not make any difference. or I don't how
> when
> > and  where to call it. I called saveChanges()
> after
> > the modifications to the body but the Service
> still
> > printed the old body xml.
> > jeff
> > 
> > 
> > 
> >  --- Jeff Saremi <[EMAIL PROTECTED]> wrote: 
> > > I think I used that one too. But let me give it
> > > another  try and get back to you.
> > > jeff
> > > 
> > > 
> > > 
> > > 
> > >  --- Jeff Greif <[EMAIL PROTECTED]>
> > wrote:
> > > 
> > > > Have you noticed the method saveChanges on
> > > > SOAPMessage?
> > > > Jeff
> > > > 
> > > > Jeff Saremi wrote:
> > > > 
> > > > >So i played more with this and here's what i
> > > found
> > > > >out:
> > > > >- In the handler, the changes to the message,
> > > > envelope
> > > > >and body will all get saved and passed to the
> > > > Service
> > > > >afterwards
> > > > >- Any chnages to the nodes inside the body
> are
> > > > allowed
> > > > >to be made and displayed while in the handler
> > but
> > > > >beyond that none of those changes make it!
> > > > >
> > > > >** some where in the handler **
> > > > >public void invoke(MessageContext context) {
> > > > >  ...
> > > > >  Node someNode =  
> > > >
> > >body.getElementsByTagName("MyNodeName").item(0);   
> > > 
> > > > >someNode.appendChild(
> > > >
> > >
> >
>
>body.getOwnerDocument().createTextNode("someTextForMyNode"));
> > > > >  // print the body now
> > > > >  // the oputput will include the new text
> node
> > > > > 
> > > >
> > >
> >
> System.out.println(XMLUtils.ElementToString(body));
> > > > >
> > > > >  // out of desperation you can do the
> > following
> > > > >  // which should not be needed
> > > > >  // but they won't help you with the new
> Node
> > > > >  // being added to the body and hence being
> > > passed
> > > > >  // to your Service down the chain
> > > > >  envelope.removeBody();
> > > > >  envelope.setBody(body);
> > > > >  Message newMessage = new Message(envelope);
> > > > > 
> messageContext.setRequestMessage(newMessage);
> > > > >
> > > > >}
> > > > >
> > > > >** some time later inside the Service  **
> > > > >public Element[] service(Element[] elements)
> {
> > > > >  for (int i = 0; i < elements.length; i++) {
> 
> > > > >// print the elements to your hearts
> > content
> > > > >//

Re: Serialization of gif image

2005-04-26 Thread Anne Thomas Manes
This doesn't seem to be causing Axis a problem, but other SOAP stacks
will probably barf. There is no such service style as "wrapped" in
WSDL. You should change it to "document". (From a WSDL perspective
"wrapped" is a programming convention identified by the fact that your
soap body element has the same name as the operation. The
style="wrapped" attribute is only used in the Axis WSDD.)

This:

http://schemas.xmlsoap.org/soap/http"/>

Should be this:

http://schemas.xmlsoap.org/soap/http"/>

Regards,
Anne

On 4/26/05, Schwarz, Karl <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I've got a service defined that is transferring an java.awt.Image using SOAP 
> with attachments.
> 
> Here is the WSDL:
> 
>  targetNamespace="http://examples.com/ImageService";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:types="http://examples.com/ImageService/types";
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
> xmlns:tns="http://examples.com/ImageService";>
> 
> 
> 
> http://examples.com/ImageService/types";
> xmlns:types="http://examples.com/ImageService/types";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  transport="http://schemas.xmlsoap.org/soap/http"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  location="http://192.168.1.1:8080/axis/services/ImageryService"/>
> 
> 
> 
> 
> It worked fine when the Image was of type image/jpeg (the wsdl defined the 
> type as image/jpeg), but now that I am trying to send a gif image, I see that 
> the client is still setting the Content-Type in the mime attachment to 
> image/jpeg.
> 
> From what I can see from stepping through the 
> org.apache.axis.encoding.ser.ImageDataHandlerSerialize.serialize() method, 
> when the Data Handler is created the content type for the ImageDataSource() 
> object is not specified and so it defaults to image/jpeg.
> 
> Have I missed something that will allow support for gif (or other 
> content-types)?
> 
> regards
> Karl
>


Re: RPC/Encoded and Java<->XML Data Binding

2005-04-26 Thread babloosony
Hi Anne,

Thank you for the response. Can you please tell me why we cannot use
any Java to XML Binding frameworks like castor when trying to consme a
 RPC/Encoded style WSDL ? Soap encoding using xml schemas and can't we
castor to serializer soap request envelope in the format specified by
xml schema in the wsdl ? Please suggest ...

Thanks & Regards,
Kumar.

On 4/26/05, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> Also -- from my perspective, there are absolutely no advantages of
> using SOAP encoding over literal encoding. That's of course working on
> the assumption that the reason you are using SOAP is to enable
> heterogeneous interoperability.
> 
> If you want to use SOAP in place of a homogeneous distributed object
> system like RMI, then there might be some small advantage in using
> SOAP encoding when passing rich object graphs. But if you want to do
> homogeneous distributed object computing, then you should use RMI, not
> SOAP.
> 
> All performance tests I've seen show that RPC/encoded is slower than
> RPC/literal or doc/literal. And a huge number of interop problems are
> caused by SOAP encoding.
> 
> I'm sure that Glen Daniels has a different opinion, though.
> 
> Anne
> 
> 
> On 4/26/05, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> > You can't use a Java/XML binding framework with RPC/encoded. They only
> > work with literal encodings.
> >
> > On 4/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > Hi All,
> > >
> > > I have some basic doubts on RPC/Encoded style wsdl and what is the
> > > role of Java to XML Data Binding Frameworks like JAXB, Castor etc. in
> > > RPC/Encoded approach when we are going to consume such WSDL using AXIS
> > > and how custom serializers or deserializers work with such java to xml
> > > data binding frameworks in the process of generating the soap request
> > > envelope ?
> > >
> > > More specifically can we use Java to XML Data Binding frameworks like
> > > Castor, JAXB in a RPC/Encoded style wsdl consumption ? If so what are
> > > the advantage such approaches ?
> > >
> > > Also, can anyone please tell me what ALL are the advantages of
> > > RPC/Encoded style over document/literal or rpc/literal specially in
> > > supporting java collections like HashMap's, Vector's and complex java
> > > beans etc. ?
> > >
> > > Thanks & Regards,
> > > Kumar.
> > >
> >
>


Re: RPC/Encoded and Java<->XML Data Binding

2005-04-26 Thread Anne Thomas Manes
Also -- from my perspective, there are absolutely no advantages of
using SOAP encoding over literal encoding. That's of course working on
the assumption that the reason you are using SOAP is to enable
heterogeneous interoperability.

If you want to use SOAP in place of a homogeneous distributed object
system like RMI, then there might be some small advantage in using
SOAP encoding when passing rich object graphs. But if you want to do
homogeneous distributed object computing, then you should use RMI, not
SOAP.

All performance tests I've seen show that RPC/encoded is slower than
RPC/literal or doc/literal. And a huge number of interop problems are
caused by SOAP encoding.

I'm sure that Glen Daniels has a different opinion, though.

Anne


On 4/26/05, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> You can't use a Java/XML binding framework with RPC/encoded. They only
> work with literal encodings.
> 
> On 4/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I have some basic doubts on RPC/Encoded style wsdl and what is the
> > role of Java to XML Data Binding Frameworks like JAXB, Castor etc. in
> > RPC/Encoded approach when we are going to consume such WSDL using AXIS
> > and how custom serializers or deserializers work with such java to xml
> > data binding frameworks in the process of generating the soap request
> > envelope ?
> >
> > More specifically can we use Java to XML Data Binding frameworks like
> > Castor, JAXB in a RPC/Encoded style wsdl consumption ? If so what are
> > the advantage such approaches ?
> >
> > Also, can anyone please tell me what ALL are the advantages of
> > RPC/Encoded style over document/literal or rpc/literal specially in
> > supporting java collections like HashMap's, Vector's and complex java
> > beans etc. ?
> >
> > Thanks & Regards,
> > Kumar.
> >
>


Re: RPC/Encoded and Java<->XML Data Binding

2005-04-26 Thread Anne Thomas Manes
You can't use a Java/XML binding framework with RPC/encoded. They only
work with literal encodings.

On 4/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> I have some basic doubts on RPC/Encoded style wsdl and what is the
> role of Java to XML Data Binding Frameworks like JAXB, Castor etc. in
> RPC/Encoded approach when we are going to consume such WSDL using AXIS
> and how custom serializers or deserializers work with such java to xml
> data binding frameworks in the process of generating the soap request
> envelope ?
> 
> More specifically can we use Java to XML Data Binding frameworks like
> Castor, JAXB in a RPC/Encoded style wsdl consumption ? If so what are
> the advantage such approaches ?
> 
> Also, can anyone please tell me what ALL are the advantages of
> RPC/Encoded style over document/literal or rpc/literal specially in
> supporting java collections like HashMap's, Vector's and complex java
> beans etc. ?
> 
> Thanks & Regards,
> Kumar.
>


Re: Exception in thread "main" java.lang.NoClassDefFoundError

2005-04-26 Thread Plorks mail

Yes, i've just movedeverythign to a simpler folder c:\axis
so i'll try again
Cheers
From: Rohitdev Kulshrestha <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: Re: Exception in thread "main" java.lang.NoClassDefFoundError
Date: Tue, 26 Apr 2005 21:47:24 +0530
Hi,
Try relocating the jar fro the directory  for e.g "C:\Program 
Files\axis1.2rc3\..." to something like "C:\Axis1.2rc3\".
This should resolve your problem.
FYI : This probem arises due to 8.3 file format on windows.

Plorks mail wrote:

Hello
I am following the Axis installation instrunction from here
http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices
I get to step 6 set my classpath then i try to run the admin client using 
this

java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
But i get this error -
Exception in thread "main" java.lang.NoClassDefFoundError: 
Files\AXIS\axis-1_1\lib\axis/jar

checked my classpath and it looks correct
C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program 
Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program 
Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program 
Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program 
Files\AXIS\axis-1_1\lib\saaj.jar;  C:\Program 
Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program 
Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program 
Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program 
Files\AXIS\axis-1_1\lib\activation.jar

Can anybody help
_
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



_
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



Re: Exception in thread "main" java.lang.NoClassDefFoundError

2005-04-26 Thread Rohitdev Kulshrestha
Hi,
Try relocating the jar fro the directory  for e.g "C:\Program 
Files\axis1.2rc3\..." to something like "C:\Axis1.2rc3\".
This should resolve your problem.
FYI : This probem arises due to 8.3 file format on windows.

Plorks mail wrote:

Hello
I am following the Axis installation instrunction from here
http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices
I get to step 6 set my classpath then i try to run the admin client 
using this

java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
But i get this error -
Exception in thread "main" java.lang.NoClassDefFoundError: 
Files\AXIS\axis-1_1\lib\axis/jar

checked my classpath and it looks correct
C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program 
Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program 
Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program 
Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program 
Files\AXIS\axis-1_1\lib\saaj.jar;  C:\Program 
Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program 
Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program 
Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program 
Files\AXIS\axis-1_1\lib\activation.jar

Can anybody help
_
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
http://messenger.msn.co.uk





RE: communication between the Handler and the Service

2005-04-26 Thread Jeff Saremi
ashutosh, 
thanks for taking the time to reply.
I tried the test code and the resolution you had
posted but it did not make any difference.

Then i went on to try the sample code you had and
realized that i don't get the problem that was posted
as a bug. I didn't even need to call setSOAPEnvelope()
method. May be the issue is gone away in 1.2RC3.

However my problem still persists. My issue is that i
don't want to add a new element to the body but rather
i'd like to modify an existing one. See the code
below. None of the saveChanges() or setSOAPEnvelope()
or other method calls can make the modified body
persist beyon the scope of the invoke() method in the
handler:

public void invoke(MessageContext context) {
  ...
  Node someNode =   
  body.getElementsByTagName("MyNodeName").item(0);

  someNode.appendChild(

  body.getOwnerDocument().createTextNode(
  "someTextForMyNode"));
  // print the body now
  // the oputput includes the new text node
  System.out.println(XMLUtils.ElementToString(body));

  // the body shows the modification correctly here
  // however after the message is forwarded to the
service
  // you can no longer see the changes





 --- "Shahi, Ashutosh" <[EMAIL PROTECTED]> wrote: 
> Jeff,
>  I haven't gone through the entire discussion,
> but the problem might
> be linked to
> http://issues.apache.org/jira/browse/AXIS-1469
> See if it helps.
> 
> Thanks,
> Ashutosh
> 
> -Original Message-
> From: Jeff Saremi [mailto:[EMAIL PROTECTED] 
> Sent: Monday, April 25, 2005 8:47 PM
> To: axis-user@ws.apache.org
> Subject: Re: communication between the Handler and
> the Service
> 
> It did not make any difference. or I don't how when
> and  where to call it. I called saveChanges() after
> the modifications to the body but the Service still
> printed the old body xml.
> jeff
> 
> 
> 
>  --- Jeff Saremi <[EMAIL PROTECTED]> wrote: 
> > I think I used that one too. But let me give it
> > another  try and get back to you.
> > jeff
> > 
> > 
> > 
> > 
> >  --- Jeff Greif <[EMAIL PROTECTED]>
> wrote:
> > 
> > > Have you noticed the method saveChanges on
> > > SOAPMessage?
> > > Jeff
> > > 
> > > Jeff Saremi wrote:
> > > 
> > > >So i played more with this and here's what i
> > found
> > > >out:
> > > >- In the handler, the changes to the message,
> > > envelope
> > > >and body will all get saved and passed to the
> > > Service
> > > >afterwards
> > > >- Any chnages to the nodes inside the body are
> > > allowed
> > > >to be made and displayed while in the handler
> but
> > > >beyond that none of those changes make it!
> > > >
> > > >** some where in the handler **
> > > >public void invoke(MessageContext context) {
> > > >  ...
> > > >  Node someNode =  
> > >
> >body.getElementsByTagName("MyNodeName").item(0); 
> > 
> > > >someNode.appendChild(
> > >
> >
>
>body.getOwnerDocument().createTextNode("someTextForMyNode"));
> > > >  // print the body now
> > > >  // the oputput will include the new text node
> > > > 
> > >
> >
> System.out.println(XMLUtils.ElementToString(body));
> > > >
> > > >  // out of desperation you can do the
> following
> > > >  // which should not be needed
> > > >  // but they won't help you with the new Node
> > > >  // being added to the body and hence being
> > passed
> > > >  // to your Service down the chain
> > > >  envelope.removeBody();
> > > >  envelope.setBody(body);
> > > >  Message newMessage = new Message(envelope);
> > > >  messageContext.setRequestMessage(newMessage);
> > > >
> > > >}
> > > >
> > > >** some time later inside the Service  **
> > > >public Element[] service(Element[] elements) {
> > > >  for (int i = 0; i < elements.length; i++) { 
> > > >// print the elements to your hearts
> content
> > > >// you will not see any traces of the
> > textnode
> > > >// you added in your handler
> > > >// all you see is the original elements 
> > > >System.out.println(
> > > >  XMLUtils.ElementToString(elements[i]));
> > > >  }
> > > >  return elements;
> > > >}
> > > >
> > > >jeff
> > > >
> > > > --- Jeff Saremi <[EMAIL PROTECTED]> wrote: 
> > > >  
> > > >
> > > >>I should have explained more about what i'm
> > doing.
> > > I
> > > >>don't know where this processRequest() method
> > is.
> > > It
> > > >>looks like there are two or more Handler
> > concepts
> > > >>within Axis. The Handler that i'm talking
> about
> > > are
> > > >>the ones you specify in the "requestFlow" or
> > > >>"responseFlow" chains:
> > > >>
> > > >>  
> > > >> > value="MyService"
> > > />
> > > >> > > value="service"
> > > >>/>
> > > >>
> > > >>  
> > > >> 
> > > >>  
> > > >>
> > > >>Here's the method that MyHandler overrides.
> The
> > > code
> > > >>below is just to point out the problem -- this
> > is
> > > >>not
> > > >>how i'm planning on writing my final code:
> > > >>
> > > >>public class WARPHandler extends BasicHandler
> {
> > > >>public void invoke(MessageContext context)
> > throws
> > > >>AxisFault {
> > > >>  try {

Re: Sending SOAP Messages

2005-04-26 Thread Rakesh Lakshminarayana
I modified one of the samples (misc/TestClient.java). On first look It
seems to work. I am listing the code here. Is there an easy way, given
a wsdl and a method name, to generate Server Address, SOAPAction and
SOAP Message?

   public static String msg = "" +
 "http://www.w3.org/2001/XMLSchema-instance\";
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\";
xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\";> " +
" " +
"http://ripedev.com/webservices/\";> " +
"atlanta " +
" " +
" " +
""; 

public static String doTest (String args[], String op) throws Exception {
  Options  opts= new Options( args );
  String   url = "http://www.ripedev.com/webservices/ZipCode.asmx";;
  String   soapAction  =
"http://ripedev.com/webservices/CityToZipCode"; ;

  if (op != null) soapAction = op;

  args = opts.getRemainingArgs();
  if ( args != null ) soapAction = args[0];

  InputStream   input   = new ByteArrayInputStream(msg.getBytes());
  Service   service = new Service();
  Call  call= (Call) service.createCall();
  SOAPEnvelope  env = new SOAPEnvelope(input);

  call.setTargetEndpointAddress( new URL(url) );
  if (soapAction != null) {
  call.setUseSOAPAction( true );
  call.setSOAPActionURI( soapAction );
  }

  System.out.println( "Request:\n" + msg );

  env = call.invoke( env );

  System.out.println( "Response:\n" + env.toString() );
  return( env.toString() );
}

Thanks,
Rakesh

On 4/26/05, Plorks mail <[EMAIL PROTECTED]> wrote:
> 
> 
> Have you found any help yet?
> 
> I'm looking to do soemthing similar and very stuck
> 
> >From: Rakesh Lakshminarayana <[EMAIL PROTECTED]>
> >Reply-To: Rakesh Lakshminarayana <[EMAIL PROTECTED]>
> >To: axis-user@ws.apache.org
> >Subject: Sending SOAP Messages
> >Date: Tue, 26 Apr 2005 09:48:40 -0400
> >
> >I am looking for starting code that can send SOAP Messages using AXIS.
> >If you have any then please do share it with me at [EMAIL PROTECTED]
> >  Thank You.
> >
> >Given Parameters
> >Server Address: http://www.ripedev.com/webservices/ZipCode.asmx
> >SOAPAction: http://ripedev.com/webservices/CityToZipCode
> >SOAP Message::
> > >standalone="no"?> >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> >xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
> >xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> >xmlns:s="http://www.w3.org/2001/XMLSchema";
> >xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> >xmlns:tns="http://ripedev.com/webservices/";
> >xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
> >xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
> >xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > > >xmlns:tns="http://ripedev.com/webservices/";>atlanta
> 
> _
> Be the first to hear what's new at MSN - sign up to our free newsletters!
> http://www.msn.co.uk/newsletters
> 
>


Re: exception when call.invoke

2005-04-26 Thread Bruno Gonçalves




I already did that but I exactly have the same problem! :(
How it can be possible?

Thanks anyway!

[EMAIL PROTECTED] wrote:

  
  
  What are you running this in ? In a standalone
client or in an application server (which one?)
   
  Why don't you try using wsdl2java and create
stub classes to use instead. It is far simpler.
  then your call to the web service just becomes:
  ret =
echoWebService.test(code,utilizador_portal,password);
   
  
-Original Message-
From: Bruno Gonçalves [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 15, 2005 5:37 AM
To: axis-user@ws.apache.org
Subject: exception when call.invoke


Hi there!

I receive this exception:
java.lang.ClassCastException:
org.apache.axis.transport.http.HTTPSender


,when I execute this code:

        try {
            String endpoint = "http://localhost:8080/axis/Echo.jws";

            logger.info("DEBUG
>>> 1");
            Service service =
new Service();
            logger.info("DEBUG
>>> 2");
            Call call = (Call)
service.createCall();
            logger.info("DEBUG
>>> 3");

           
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
           
call.setOperation("test");
           
call.addParameter("code", XMLType.XSD_STRING, ParameterMode.IN);
           
call.addParameter("utilizador_portal", XMLType.XSD_STRING,
ParameterMode.IN);
           
call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
           
call.setReturnType(XMLType.XSD_STRING);
            
            logger.info("DEBUG
>>> 4");
           
//call.setOperationName(new QName("http://soapinterop.org/", "test"));
           
//logger.info("DEBUG >>> 5");

            String ret =
(String) call.invoke(new Object[] {"123", "user", "passwd"});
<= EXCEPTION!!
            logger.info("DEBUG
>>> 6");

           
System.out.println("RESULT >>> '" + ret + "'");
            logger.info("DEBUG
>>> 7");
        } catch (Exception e) {
           
System.err.println(e.toString());
        }

Any help? :(

---
Bruno Vg
 







custom header elements SOAP messages

2005-04-26 Thread Plorks mail

Hello
Please can someone help me
I've partly created a handler, code below
I want to simply test this with a client that can add a soap header, can 
someone show me how to do this?

I'm not sure how to create a client
I then need to be able to pass vlaues back to the server-side from the 
client-side =- how can i do this?

Any help reatly appreciated

public void invoke(MessageContext msgContext) throws AxisFault
   {
   handleRequest(msgContext);
   super.invoke(msgContext);
   }
   public boolean handleResponse(MessageContext msgContext)
   {
   try
   {
   Message message = msgContext.getRequestMessage();
   SOAPEnvelope requestEnvelope = message.getSOAPEnvelope();
   SOAPHeaderElement headerElement = 
requestEnvelope.getHeaderByName("http://domain","TokenHeader";);

   if (headerElement != null)
   {
   String headerElementValue = 
(String)headerElement.getValue();

   // make sure the headerElementValue is valid
   validateTokenValue(headerElementValue);
   }
   else
   {
   // something's gone wrong
   // no header TokenHeader found, therefore we need to create 
a header element and return to client

   // get userName and password
   // pass to db to validate
   //SOAPHeaderElement responseHeaderElement = new 
SOAPHeaderElement("http://domain","TokenHeader";);
   //responseHeaderElement.setObjectValue(sTokenValue);
   }
   }
   catch(Exception e)
   {
   System.out.println(e);
   }

   return true;
   }
   public boolean handleRequest(MessageContext msgContext)
   {
   try
   {
   //SOAPEnvelope responseEnvelope = 
msgContext.getResponseMessage().getSOAPEnvelope();
   Message message = msgContext.getResponseMessage();
   SOAPEnvelope responseEnvelope = message.getSOAPEnvelope();

   }
   catch(Exception e)
   {
   System.out.println(e);
   }
   return true;
   }
_
Winks & nudges are here - download MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



Again CastClassException.. :(

2005-04-26 Thread Bruno Gonçalves




I wroten a Echo WebService:


package xpto;

public class Echo
{
    public String echoMethod(String arg)
    {
    return arg;
    }
}


and I did a WSDL2Java to create the stubs.

I invoke this way the stub:

    public String Test(String str){
        
        EchoServiceLocator service = new EchoServiceLocator();
        
        try{ 
            
            Echo port = service.getEcho();
            
            return port.echoMethod(str);
            
        }catch (Exception e)
        {
            System.err.println(e.getMessage());
            return null;
        }
    }


And I got an CastClassException...

Anybody... please, help me! :(


---
Bruno Vg






Domino on Windows 2K/2K3 authentication

2005-04-26 Thread Mirko Delgado




Hi
 
I'm new to AXIS and Web Services 
implementation/development.
 
We are currently developing a web service 
client/server module to interact with Domino.  We would like to 
authenticate users through some login request.  Ideally a 
SOAP request command issued to Domino server validatin against a 
WIN 2K/2K3 user account.  How can I 
authenticate a user in this manner?
 
Any information anyone could provide would be greatly appreciated.
 
thanks,
 
Mirko


SAXException: No deserializer

2005-04-26 Thread Mark Harris
Hello,

I'm writing a web service which includes a SOAP interface on an Orion
server. This interface has 2 calls, both read-only. They both return an
instance of the same object, a custom Java class. One of the instance
variables in this class is a java.util.List.

It all works well if I just add Strings to the java.util.List - the data
gets returned correctly. However, problems arise if I add objects to the
List whose type is of a 2nd custom class I've created, rather than Strings.
When I try and get data out, I get errors of the type "No deserializer for
{urn:MyUrn}MyClass", where MyClass is the name of the 2nd custom class I've
created.

Both custom classes implement java.io.Serializable and I've added a
reference to MyClass in the server-config.wsdd file but am unsure as to how
to progress further with this error.

Thanks,

Mark


RPC/Encoded and Java<->XML Data Binding

2005-04-26 Thread babloosony
Hi All,

I have some basic doubts on RPC/Encoded style wsdl and what is the
role of Java to XML Data Binding Frameworks like JAXB, Castor etc. in
RPC/Encoded approach when we are going to consume such WSDL using AXIS
and how custom serializers or deserializers work with such java to xml
data binding frameworks in the process of generating the soap request
envelope ?

More specifically can we use Java to XML Data Binding frameworks like
Castor, JAXB in a RPC/Encoded style wsdl consumption ? If so what are
the advantage such approaches ?

Also, can anyone please tell me what ALL are the advantages of
RPC/Encoded style over document/literal or rpc/literal specially in
supporting java collections like HashMap's, Vector's and complex java
beans etc. ?


Thanks & Regards,
Kumar.


Question a service request or response and an handler runs in the same thread??

2005-04-26 Thread Mik
My problem is to pass information 
from a Service-client to a ClientRequestHandler and 
then from a ServerRequestHandler to a Service-provider not making use
of the MessageContext.

So i' am thinking to use the ThreadLocal pattern to constuct a
stateful singleton and in this way pass information from a Service to
the Handler and vice versa.

Now my question is: are a Service and an Handler or a chain of
Handlers different steps of the same Thread.

What Happens if for example i do the following:

Service service1=new Service();
Service service2=new Service();

Call call1=service1.creatCall();
Call call2=service2.creatCall();

call1.invoke(EndPointRef_1);
call2.invoke(EndPointRef_2);

Are the different Requests and the subsequent operations of an Handler
part of the same Thread ?

Thanks in advance for any help.


Sending SOAP Messages

2005-04-26 Thread Rakesh Lakshminarayana
I am looking for starting code that can send SOAP Messages using AXIS.
If you have any then please do share it with me at [EMAIL PROTECTED] 
 Thank You.

Given Parameters
Server Address: http://www.ripedev.com/webservices/ZipCode.asmx
SOAPAction: http://ripedev.com/webservices/CityToZipCode
SOAP Message:: 
http://schemas.xmlsoap.org/soap/envelope/";
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:s="http://www.w3.org/2001/XMLSchema";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:tns="http://ripedev.com/webservices/";
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>http://ripedev.com/webservices/";>atlanta


RE: Exception in thread "main" java.lang.NoClassDefFoundError

2005-04-26 Thread Plorks mail
Thanks i'll give that a go

From: [EMAIL PROTECTED]
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: RE: Exception in thread "main" java.lang.NoClassDefFoundError
Date: Tue, 26 Apr 2005 08:46:16 -0400
Looks like you need to put quotes around the specification of classpath.
java -cp "%AXISCLASSPATH%" ...
> -Original Message-
> From: Plorks mail [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 26, 2005 6:18 AM
> To: axis-user@ws.apache.org
> Subject: Exception in thread "main" java.lang.NoClassDefFoundError
>
>
>
> Hello
>
> I am following the Axis installation instrunction from here
>
> http://ws.apache.org/axis/java/install.html#Step5InstallingNew
> WebServices
>
> I get to step 6 set my classpath then i try to run the admin
> client using
> this
>
> java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
>  -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
>
>
> But i get this error -
> Exception in thread "main" java.lang.NoClassDefFoundError:
> Files\AXIS\axis-1_1\lib\axis/jar
>
>
> checked my classpath and it looks correct
>
> C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program
> Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program
> Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program
> Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program
> Files\AXIS\axis-1_1\lib\saaj.jar;  C:\Program
> Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program
> Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program
> Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program
> Files\AXIS\axis-1_1\lib\activation.jar
>
>
> Can anybody help
>
> _
> It's fast, it's easy and it's free. Get MSN Messenger 7.0 today!
> http://messenger.msn.co.uk
>
_
Winks & nudges are here - download MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



Invoke() success, CheckMessage() fails

2005-04-26 Thread leonardo rodrigo
Dear all,
I'm encountering problems using a WebService via Axis C++, and hopefully
this problem is well known
For the record:
OS: Windows XP
Axis C++: v1.5 win 32
IDE: Visual C++
The client code runs well until the first WebService method call is
requested. The m_pCall->Invoke() returns AXIS_SUCCESS, however,
m_pCall->CheckMessage(""suma0Response", "http://WsCamila/Calculo.wsdl"";)
fails, thus I'm not able to get the return
result of the WebService.
I think that don't have something, my web service is in Oracle with 
jdeveloper

I would appreciate if someone could give me a hint, if one needs more
information, send an email of course.
Best Regard
Leonardo



RE: Exception parsing complex data type

2005-04-26 Thread Schwarz, Karl
Got it to work...seems that the deploy.wsdd file created by Eclipse/WST didn't 
set style attribute to "wrapped". When I set it manually, all is well.

Please note the last wsdl I provided didn't have the style set to wrapped, but 
it was with the copy I was using.

Sorry for the confusion

Ann, thanks for all your help

Karl

-Original Message-
From: Schwarz, Karl [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 19, 2005 7:53 AM
To: axis-user@ws.apache.org
Subject: RE: Exception parsing complex data type


Well I've tried a few different tracks and I am still left with the same 
original problem, that is an org.xml.sax.SAXException: Invalid element exception

The wsdl I am using is a follows:

http://examples.com/PhotoCatalog";
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
  xmlns:xsd="http://www.w3.org/2001/XMLSchema";
  xmlns:types="http://examples.com/PhotoCatalog/types";
  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
  xmlns:tns="http://examples.com/PhotoCatalog";>




http://examples.com/PhotoCatalog/types";
   xmlns:types="http://examples.com/PhotoCatalog/types";>




   
  
 
  
   


   
  
 
  
   







   
  
 
 
 
  
   

  



  
  
  
  



  



  
  



  



  


  
  


  



  http://schemas.xmlsoap.org/soap/http"/>
  


  

  


  

  


  

  
  


  

  


  

  


  

  


  
http://192.168.1.100:8080/axis/services/PhotoCatalogPort"/>
  



I removed the use of swaRef in accordance with 3.1.4.1 of WS-I Usage Scenarios 
for the WS-I Attachments Profile 1.0 (version 1.02 
http://www.ws-i.org/SampleApplications/UsageScenariosAP-1.02-MRD.pdf)


Has anyone successfully processed a SOAP with Attachments request using AXIS 
1-2RC3 and a wsdl like the one I have included.


Karl


RE: Exception in thread "main" java.lang.NoClassDefFoundError

2005-04-26 Thread Grimm_Clifford
Looks like you need to put quotes around the specification of classpath.


java -cp "%AXISCLASSPATH%" ... 


> -Original Message-
> From: Plorks mail [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, April 26, 2005 6:18 AM
> To: axis-user@ws.apache.org
> Subject: Exception in thread "main" java.lang.NoClassDefFoundError
> 
> 
> 
> Hello
> 
> I am following the Axis installation instrunction from here
> 
> http://ws.apache.org/axis/java/install.html#Step5InstallingNew
> WebServices
> 
> I get to step 6 set my classpath then i try to run the admin 
> client using 
> this
> 
> java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
>  -lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
> 
> 
> But i get this error -
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> Files\AXIS\axis-1_1\lib\axis/jar
> 
> 
> checked my classpath and it looks correct
> 
> C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program 
> Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program 
> Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program 
> Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program 
> Files\AXIS\axis-1_1\lib\saaj.jar;  C:\Program 
> Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program 
> Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program 
> Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program 
> Files\AXIS\axis-1_1\lib\activation.jar
> 
> 
> Can anybody help
> 
> _
> It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
> http://messenger.msn.co.uk
> 


What do i need to do

2005-04-26 Thread Plorks mail

I've created a soap handler with handleRequest/handleResponse/invoke methods
I now want to test a client to make sure the client is able to create a soap 
header and send the value in that header to my soap handler to process it

I haven't created a WSDL file or a deply/undeploy WSDD file before - do i 
have to create these before i can continue?

I'm new to axis/soap, please can someone help me
Many Thanks
_
Use MSN Messenger to send music and pics to your friends 
http://messenger.msn.co.uk



Re: Serialization of gif image

2005-04-26 Thread Davanum Srinivas
Please create a bug report.

thanks,
dims

On 4/26/05, Schwarz, Karl <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I've got a service defined that is transferring an java.awt.Image using SOAP 
> with attachments.
> 
> Here is the WSDL:
> 
>  targetNamespace="http://examples.com/ImageService";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:types="http://examples.com/ImageService/types";
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
> xmlns:tns="http://examples.com/ImageService";>
> 
> 
> 
> http://examples.com/ImageService/types";
> xmlns:types="http://examples.com/ImageService/types";>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  transport="http://schemas.xmlsoap.org/soap/http"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  location="http://192.168.1.1:8080/axis/services/ImageryService"/>
> 
> 
> 
> 
> It worked fine when the Image was of type image/jpeg (the wsdl defined the 
> type as image/jpeg), but now that I am trying to send a gif image, I see that 
> the client is still setting the Content-Type in the mime attachment to 
> image/jpeg.
> 
> From what I can see from stepping through the 
> org.apache.axis.encoding.ser.ImageDataHandlerSerialize.serialize() method, 
> when the Data Handler is created the content type for the ImageDataSource() 
> object is not specified and so it defaults to image/jpeg.
> 
> Have I missed something that will allow support for gif (or other 
> content-types)?
> 
> regards
> Karl
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/


Re: BPELJ

2005-04-26 Thread Matthieu Riou
Hi Sandeep,

There's an open source implementation of the WS-BPEL standard named
Twister. You can find more about it here:

http://www.smartcomps.org/twister

We're currently merging Twister with the Apache Incubator project
Agila (source is being moved to Agila's repository, documentation will
follow) so if you want more information I'd advise subscribing to
[EMAIL PROTECTED] and checking current Twister site.

Twister-becoming-Agila-BPEL is not a BPELJ implementation though but
AFAIK BPELJ is just a proposal made by BEA and IBM and not a standard
(it's actually kind of breaking the WS-BPEL standard). I'd advise
sticking with BPEL as BPELJ has very little added value.

Cheers,

Matthieu Riou.


RE: Example Wrapped/Literal WSDD file anyone ?

2005-04-26 Thread Schwarz, Karl
TImothy,

Here is one that I have used:









http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

  

  
  http://examples.com/ImageService"/>
  
  
  
  
  
  
  

  http://examples.com/ImageService";
qname="ns:DataHandler"
type="java:javax.activation.DataHandler"

serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"

deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory"
encodingStyle=""
  />
  http://examples.com/ImageService/types";
qname="ns:>ImageInfo"
type="java:com.examples.ImageService.types.ImageInfo"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
  />
  http://examples.com/ImageService/types";
qname="ns:>getImage"
type="java:com.examples.ImageService.types.GetImage"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
  />
  http://examples.com/ImageService/types";
qname="ns:>replaceImage"
type="java:com.examples.ImageService.types.ReplaceImage"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
  />
  http://examples.com/ImageService/types";
qname="ns:>addImage"
type="java:com.examples.ImageService.types.AddImage"
serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
encodingStyle=""
  />
  


I am fairly new to this but it looks like yours is missing the attribute : 
provider="java:RPC"


regards
Karl Schwarz

-Original Message-
From: Timothy Thorpe [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 26, 2005 7:03 AM
To: axis-user@ws.apache.org
Subject: Example Wrapped/Literal WSDD file anyone ?


Hello There

Does anyone have an example 'deploy.wsdd' file that deploys their AXIS web
service as 'wrapped/literal' that they could send me ?

I have an RPC/Encoded web service that I want to convert to Wrapped/Literal
but am struggling to get the WSDD right (it is attached) - the web service
deployed using this WSDD seems to still be accepting only RPC/Encoded
requests. 

Many Thanks,
Timothy Thorpe

Consultant Software Engineer



Serialization of gif image

2005-04-26 Thread Schwarz, Karl
Hi,

I've got a service defined that is transferring an java.awt.Image using SOAP 
with attachments.

Here is the WSDL:

http://examples.com/ImageService";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:types="http://examples.com/ImageService/types";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:tns="http://examples.com/ImageService";>



http://examples.com/ImageService/types";
xmlns:types="http://examples.com/ImageService/types";>





















































































http://schemas.xmlsoap.org/soap/http"/>


















 
































http://192.168.1.1:8080/axis/services/ImageryService"/>




It worked fine when the Image was of type image/jpeg (the wsdl defined the type 
as image/jpeg), but now that I am trying to send a gif image, I see that the 
client is still setting the Content-Type in the mime attachment to image/jpeg.

>From what I can see from stepping through the 
>org.apache.axis.encoding.ser.ImageDataHandlerSerialize.serialize() method, 
>when the Data Handler is created the content type for the ImageDataSource() 
>object is not specified and so it defaults to image/jpeg.

Have I missed something that will allow support for gif (or other 
content-types)? 

regards
Karl


BPELJ

2005-04-26 Thread Sandeep Gaikwad
I am new to this specification.
Can anyone give me information about any open source(tool) available for implementation of BPELJ code.
 __Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com 

Example Wrapped/Literal WSDD file anyone ?

2005-04-26 Thread Timothy Thorpe
Hello There

Does anyone have an example 'deploy.wsdd' file that deploys their AXIS web
service as 'wrapped/literal' that they could send me ?

I have an RPC/Encoded web service that I want to convert to Wrapped/Literal
but am struggling to get the WSDD right (it is attached) - the web service
deployed using this WSDD seems to still be accepting only RPC/Encoded
requests. 

Many Thanks,
Timothy Thorpe

Consultant Software Engineer



deploy.wsdd
Description: Binary data


Attachments [again]

2005-04-26 Thread Tom Ziemer
Sorry to bother you again with the same question, but I am really stuck 
here.

I need to send a binary file from the server to a client, yet I am not 
sure where/when to actually add the attachment (on the server) and how 
to get access to the attachment on the client side.

So far I'm trying this:
DataHandler dh = new DataHandler(new FileDataSource("/tmp/ws_expor.xls"));
SOAPMessageContext smc = (SOAPMessageContext) 
MessageContext.getCurrentContext();
boolean isNull = smc==null;
logger.info("is smc == null?"+isNull);
AttachmentPart ap = smc.getMessage().createAttachmentPart();
ap.setDataHandler(dh);
smc.getMessage().addAttachmentPart(ap);

Any answers or pointers to samples/documentation would be extremely helpful.
Thank you,
Tom


RE: AW: MessageContext - SOAP headers

2005-04-26 Thread Plorks mail
Hello
Ive got this so far
public class SOAPHandler extends HTTPSender
{
   public void invoke(MessageContext msgContext) throws AxisFault
   {
   handleRequest(msgContext);
   super.invoke(msgContext);
   }
   public boolean handleRequest(MessageContext context)
   {
   try
   {
   Message message = context.getRequestMessage();
   SOAPEnvelope envelope = message.getSOAPEnvelope();
   SOAPHeaderElement header = 
envelope.getHeaderByName("http://addressinhere","TokenHeader";);
   }
   catch(Exception e)
   {
   System.out.println(e);
   }

   return true;
I know i need a handleResponse - will that be similar to handleRequest?
Can you tell me what MessageContext is?
I'm new to Axis
Thanks for any help

From: "Dorner, Thomas" <[EMAIL PROTECTED]>
Reply-To: axis-user@ws.apache.org
To: axis-user@ws.apache.org
Subject: AW: MessageContext - SOAP headers Date: Tue, 26 Apr 2005 12:16:28 
+0200

The invoke(MessageContext context) of the Handler (every handler needs
invoke()) gets the MessageContext
Then make the following:
Message msg = context.getRequestMessage();
SOAPEnvelope env = msg.getSOAPEnvelope();
SOAPHeaderElement header =
env.getHeaderByName("http://xml.apache.org/axis/session";, "sessionID");
Tomi
-Ursprüngliche Nachricht-
Von: Plorks mail [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 26. April 2005 11:11
An: axis-user@ws.apache.org
Betreff: MessageContext - SOAP headers
Hello
Please can someone help me as I am really stuck and confused
I have some server-side code that passes parameters to a back-end db table.
If OK, I return a string value
I want to write a AXIS SOAP handler that will do the following :
1. Take the string value and pass it to a client - the client will create a
SOAP header and store the vlaue in it
2.  I want to be able to get the SOAP header value from the client, to 
check
the value, if it exists, and if needed update the SOAP header value.

To get the SOAP header vlaue in the client, do i use MessageContext?
So the string returned by the 'server-side' is used by the client in it's
fruther communication as a proof of authenticated client
_
Use MSN Messenger to send music and pics to your friends
http://messenger.msn.co.uk
_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/



Exception in thread "main" java.lang.NoClassDefFoundError

2005-04-26 Thread Plorks mail

Hello
I am following the Axis installation instrunction from here
http://ws.apache.org/axis/java/install.html#Step5InstallingNewWebServices
I get to step 6 set my classpath then i try to run the admin client using 
this

java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
But i get this error -
Exception in thread "main" java.lang.NoClassDefFoundError: 
Files\AXIS\axis-1_1\lib\axis/jar

checked my classpath and it looks correct
C:\Program Files\AXIS\axis-1_1\lib\axis.jar;C:\Program 
Files\AXIS\axis-1_1\lib\commons-discovery.jar;C:\Program 
Files\AXIS\axis-1_1\lib\commons-logging.jar;C:\Program 
Files\AXIS\axis-1_1\lib\jaxrpc.jar;C:\Program 
Files\AXIS\axis-1_1\lib\saaj.jar;  C:\Program 
Files\AXIS\axis-1_1\lib\log4j-1.2.8.jar;C:\Program 
Files\AXIS\axis-1_1\lib\xml-apis.jar;C:\Program 
Files\AXIS\axis-1_1\lib\xercesImpl.jar;C:\Program 
Files\AXIS\axis-1_1\lib\activation.jar

Can anybody help
_
It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! 
http://messenger.msn.co.uk



AW: MessageContext - SOAP headers

2005-04-26 Thread Dorner, Thomas
The invoke(MessageContext context) of the Handler (every handler needs
invoke()) gets the MessageContext

Then make the following:

Message msg = context.getRequestMessage();
SOAPEnvelope env = msg.getSOAPEnvelope();
SOAPHeaderElement header =
env.getHeaderByName("http://xml.apache.org/axis/session";, "sessionID");

Tomi

-Ursprüngliche Nachricht-
Von: Plorks mail [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 26. April 2005 11:11
An: axis-user@ws.apache.org
Betreff: MessageContext - SOAP headers 


Hello

Please can someone help me as I am really stuck and confused

I have some server-side code that passes parameters to a back-end db table.

If OK, I return a string value

I want to write a AXIS SOAP handler that will do the following :

1. Take the string value and pass it to a client - the client will create a
SOAP header and store the vlaue in it

2.  I want to be able to get the SOAP header value from the client, to check
the value, if it exists, and if needed update the SOAP header value.

To get the SOAP header vlaue in the client, do i use MessageContext?

So the string returned by the 'server-side' is used by the client in it's
fruther communication as a proof of authenticated client

_
Use MSN Messenger to send music and pics to your friends
http://messenger.msn.co.uk


Re: SOAP Body and Header response

2005-04-26 Thread Alecsandru Chirosca
Thanks a lot!

Thanks for your response.

BR,
Alecs

On Tue, 2005-04-26 at 10:11 +0300, Alecsandru Chirosca wrote:
> Thanks for your answer!
> 
> You are refering to a Context. What is this context?
> 
> I have build the --server-side of the service WSDL and I don't have any
> reference to a contaxt in the impl class.
> Please help.
> 
> 
> Sorry, but I'm now to AXIS.
> 
> Br,
> Alecs
> 
> On Mon, 2005-04-25 at 10:22 -0400, [EMAIL PROTECTED] wrote:
> > Alecs,
> > 
> > If I understand you're question correctly, the following code should help.
> > 
> > Service Side:
> > 
> > String someResponse = "some response";
> > 
> > // Get Response Envelope
> > SOAPEnvelope responseEnv = ctx.getResponseMessage().getSOAPEnvelope();
> > 
> > // Create Bean
> > ResponseHeader responseHeader = new ResponseHeader();
> > responseHeader.setValue1("Value1");
> > responseHeader.setValue2("Value2");
> > ...
> > 
> > // Create SOAP Header Element
> > SOAPHeaderElement responseHeaderElement = new
> > SOAPHeaderElement("http://www.somedomainname.com";, "ResponseHeader",
> > responseHeader);
> > or
> > SOAPHeaderElement responseHeaderElement = new
> > SOAPHeaderElement("http://www.somedomainname.com";, "ResponseHeader");
> > responseHeaderElement.setObjectValue(responseHeader);
> > 
> > 
> > // Add header to response envelope
> > responseEnv.addHeader(responseRoutingElement);
> > 
> > return response;
> > 
> > 
> > Client Side is similar:
> > 
> > // After the invoke
> > 
> > //Get the response envelope
> > SOAPEnvelope returnEnv =
> > call.getMessageContext().getResponseMessage().getSOAPEnvelope();
> > 
> > //Get the header with the same names that you put it into the SOAP with.
> > SOAPHeaderElement responseHeaderElement =
> > returnEnv.getHeaderByName("http://www.somedomainname.com","ResponseHeader";);
> > 
> > //Grab the object out of the header element.
> > responseHeader = null;
> > if(responseHeaderElement != null)
> > {
> >   // Get the bean from the SOAP...
> >   responseHeader = (ResponseHeader)
> > responseHeaderElement.getObjectValue();
> >   // Do whatever you need to do.
> > }
> > else
> > {
> >   // Trouble
> >   System.out.println("headerElement = null");
> > }
> > 
> > 
> > You need to make sure you have your bean serialization/deserialization
> > set-up correctly on both ends.
> > The response will be in the return value from the invoke...
> > 
> > Mark A. Malinoski
> > AES/PHEAA
> > Technical Coordinator/Web Development
> > 717-720-2413
> > [EMAIL PROTECTED]
> > 
> > 
> > 
> > 
> >
> >  Alecsandru
> >  Chirosca  
> >   >  [EMAIL PROTECTED]>axis-user@ws.apache.org  
> >
> > cc 
> >  04/25/2005 09:48  
> >  AMSubject 
> >SOAP Body and Header response   
> >
> >  Please respond to 
> >  [EMAIL PROTECTED] 
> >   he.org   
> >
> >
> > 
> > 
> > 
> > 
> > Hi,
> > 
> > Please help me wth this one
> > 
> > I tryed and googled a lot in the last 10 days without any result. I need
> > to return a SOAP response that is containing informations in both SOAP
> > header and SOAP body. I have the beans that correctly serialize to the
> > elements in header and boby but I cannot put them togheter.
> > 
> > Please point me in the right direction here...
> > 
> > 
> > BR,
> > Alecs
> > 
> > 
> > 
> 



MessageContext - SOAP headers

2005-04-26 Thread Plorks mail
Hello
Please can someone help me as I am really stuck and confused
I have some server-side code that passes parameters to a back-end db table.  
If OK, I return a string value

I want to write a AXIS SOAP handler that will do the following :
1. Take the string value and pass it to a client - the client will create a 
SOAP header and store the vlaue in it

2.  I want to be able to get the SOAP header value from the client, to check 
the value, if it exists, and if needed update the SOAP header value.

To get the SOAP header vlaue in the client, do i use MessageContext?
So the string returned by the 'server-side' is used by the client in it's 
fruther communication as a proof of authenticated client

_
Use MSN Messenger to send music and pics to your friends 
http://messenger.msn.co.uk



Re: SOAP Body and Header response

2005-04-26 Thread Alecsandru Chirosca
Thanks for your answer!

You are refering to a Context. What is this context?

I have build the --server-side of the service WSDL and I don't have any
reference to a contaxt in the impl class.
Please help.


Sorry, but I'm now to AXIS.

Br,
Alecs

On Mon, 2005-04-25 at 10:22 -0400, [EMAIL PROTECTED] wrote:
> Alecs,
> 
> If I understand you're question correctly, the following code should help.
> 
> Service Side:
> 
> String someResponse = "some response";
> 
> // Get Response Envelope
> SOAPEnvelope responseEnv = ctx.getResponseMessage().getSOAPEnvelope();
> 
> // Create Bean
> ResponseHeader responseHeader = new ResponseHeader();
> responseHeader.setValue1("Value1");
> responseHeader.setValue2("Value2");
> ...
> 
> // Create SOAP Header Element
> SOAPHeaderElement responseHeaderElement = new
> SOAPHeaderElement("http://www.somedomainname.com";, "ResponseHeader",
> responseHeader);
> or
> SOAPHeaderElement responseHeaderElement = new
> SOAPHeaderElement("http://www.somedomainname.com";, "ResponseHeader");
> responseHeaderElement.setObjectValue(responseHeader);
> 
> 
> // Add header to response envelope
> responseEnv.addHeader(responseRoutingElement);
> 
> return response;
> 
> 
> Client Side is similar:
> 
> // After the invoke
> 
> //Get the response envelope
> SOAPEnvelope returnEnv =
> call.getMessageContext().getResponseMessage().getSOAPEnvelope();
> 
> //Get the header with the same names that you put it into the SOAP with.
> SOAPHeaderElement responseHeaderElement =
> returnEnv.getHeaderByName("http://www.somedomainname.com","ResponseHeader";);
> 
> //Grab the object out of the header element.
> responseHeader = null;
> if(responseHeaderElement != null)
> {
>   // Get the bean from the SOAP...
>   responseHeader = (ResponseHeader)
> responseHeaderElement.getObjectValue();
>   // Do whatever you need to do.
> }
> else
> {
>   // Trouble
>   System.out.println("headerElement = null");
> }
> 
> 
> You need to make sure you have your bean serialization/deserialization
> set-up correctly on both ends.
> The response will be in the return value from the invoke...
> 
> Mark A. Malinoski
> AES/PHEAA
> Technical Coordinator/Web Development
> 717-720-2413
> [EMAIL PROTECTED]
> 
> 
> 
> 
>
>  Alecsandru
>  Chirosca  
>[EMAIL PROTECTED]>axis-user@ws.apache.org
>  
> cc 
>  04/25/2005 09:48  
>  AMSubject 
>SOAP Body and Header response   
>
>  Please respond to 
>  [EMAIL PROTECTED] 
>   he.org   
>
>
> 
> 
> 
> 
> Hi,
> 
> Please help me wth this one
> 
> I tryed and googled a lot in the last 10 days without any result. I need
> to return a SOAP response that is containing informations in both SOAP
> header and SOAP body. I have the beans that correctly serialize to the
> elements in header and boby but I cannot put them togheter.
> 
> Please point me in the right direction here...
> 
> 
> BR,
> Alecs
> 
> 
>