Problem with namespaces in SOAP message

2003-07-22 Thread java
Hi,
I try to create a SOAP message to send to a server. This server can't 
handle namespaces, so I need to get rid of the namespace in the message.

the message I need is:

http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

 
  12345
  username
  password
 



put what I try I get only this with MESSAGE

http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

<--  
this line :-)
  12345
  username
  password
 



or this with WRAPPED

http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

   
<-- this line
  
   12345
   username
   password
  
 
 
<--- and this one



Is it possible to loose the xmlns="" when MESSAGE is used or the  tag when using WRAPPED.

I must use this service and I have no control of how this service 
operate. But from spec I can't use the namespaces.

Thanks

Johan



--
Nilling Software Design
Postbus 43
2280 AA  Rijswijk ZH
w: http://www.nilling.nl



Clientside Handlers

2003-07-24 Thread java
Hi,
I have a question about handlers. I'm reading the book Axis Next 
Generation Java SOAP and it is mainly focused on the server part. But 
basicly I use only the clientside part, since the "webservice" is 
already in place. Since this server don't like namespaces and I can't 
get rid of it in Axis, I want to write a Handler that strips it out when 
sending a soap message to the server and put it back on when getting the 
response .

So I here are my questions:
1. Is it possible to strip of the soapenv / body tags from a message 
before sending? And put it back on when recieving the response?
2. Can I add a Handler to the client engine. Since I tried:

   org.apache.axis.handlers.soap.SOAPService service = 
locator.getEngine().getClientEngine().getService("http://www.nilling.nl/message.wsdl";);
   service.addHandler(new 
nl.nilling.soaphandler.NoNamespaceHandler());

which ends up with a null exception

I need an answer on the second question the most. The first is just a 
matter of trying.

Thanks,

Johan

--
Nilling Software Design
Postbus 43
2280 AA  Rijswijk ZH
w: http://www.nilling.nl



Namespaces in SoapMessage

2003-07-26 Thread java
Hi all,
I hope somebody can tell me just wether it is possible or not to create 
the next soapmessage with Axis. For two weeks I'm trying to create the 
message and I failed to do so. The message I try to create is:

http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>


 12345
 username
 password




But Axis but namespaces in it and I can get rid of it. The real problem 
I'm facing is that the XML schema's include namespaces. So the code Axis 
created from the WSDL includes namespaces. Before I send the message I 
need to strip of these namespaces and when recieving the response I need 
to put the back on. I think I can use XSLT for it but the question is 
how can I do that. I tried to add a handler on the client side, but 
until now I can't figure out how.

basiclly my flow must be

Java Class --> SoapMessage with namespace --> XSLT transform --> 
SoapMessage without namespaces --> Send Request
and ofcource
Recieve response --> Soapmessage without namespace --> XSLT transform 
--> SoapMessage with namespace --> Java Class

Is this possible? If yes what to use. Should I create or subclass a 
Handler, since org.apache.axis.client.Service extends a BasicHandler or 
should I do something else?

Any help or pointer in the right direction is helpfull

Thanks

Johan

--
Nilling Software Design
Postbus 43
2280 AA  Rijswijk ZH
w: http://www.nilling.nl



soapenv versus SOAP-ENV

2003-07-31 Thread java
Hi,
The soapmessage axis creates for me uses the prefix soapenv. The server 
I send it to expects SOAP-ENV. I tried to change this in 
org.apache.axis.Constants but it keeps on generating it with soapenv.  
Is there an other place where I have to check or set this value. Or is 
there perhaps a better way of accomplish this

Johan

--
Nilling Software Design
Postbus 43
2280 AA  Rijswijk ZH
w: http://www.nilling.nl



apache + tomcat + axis + https + CLIENT AUTENTICATION

2003-06-17 Thread java dev
Hi,

I would like to use Apache HTTPS to access Axis soap services, with CLIENT 
AUTHENTICATION.

The config work with IE and Mozilla (I can access to service?wsdl) but I can 
not use an axis client.

I can only use axis client with Https and no Client Authentication.

Can anyone help me...

Thanks.

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail



org.xml.sax.SAXException: No deserializer for {http://myfakedomain.com}TailRecord

2004-12-12 Thread Java News
Hi,
I just started to use Axis, and I stopped on error like in this post
topic - full output which I get from Servlet is:
org.xml.sax.SAXException: No deserializer for
{http://myfakedomain.com}TailRecord
org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
org.apache.axis.client.Call.invoke(Call.java:2405)
org.apache.axis.client.Call.invoke(Call.java:2301)
org.apache.axis.client.Call.invoke(Call.java:1758)
org.apache.jsp.Statistics_jsp._jspService(Statistics_jsp.java:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

What is wrong with this deserializer error? I provide some other files
below, but maybe there is any common reason for such error? Please,
can anyone give me the link to the simplest tutorial on using complex
types, or tell me which Axis samples consider complex types and is in
other hand the easiest to learn (I need to solve it very quickly to
show Axis my boss, as a potential WS platform :).

tcpmon output shows that there is an answer from service as:
HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=FAA608C67B93053DB6A645110A000C72; Path=/
Content-Type: text/xml;charset=utf-8
Date: Sun, 12 Dec 2004 14:49:46 GMT
Server: Apache-Coyote/1.1
Connection: close

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   
  http://schemas.xmlsoap.org/soap/encoding/";>
 http://schemas.xmlsoap.org/soap/encoding/";>




 
  
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="ns1:TailRecord"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:ns1="http://myfakedomain.com";>
 
 http://localhost:8180/
 127.0.0.1
 
 
  
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="ns2:TailRecord" xmlns:ns2="http://myfakedomain.com";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
 
 http://localhost:8180/
 127.0.0.1
 
 
  
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="ns3:TailRecord" xmlns:ns3="http://myfakedomain.com";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
 
 http://localhost:8180/
 127.0.0.1
 
 
  
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="ns4:TailRecord" xmlns:ns4="http://myfakedomain.com";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
 
 http://localhost:8180/
 127.0.0.1
 
 
  
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="xsd:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>323
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="xsd:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>324
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="xsd:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>326
  http://schemas.xmlsoap.org/soap/encoding/";
xsi:type="xsd:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>325
   

File Statistics.jws looks like:

import com.myfakedomain.TailRecord;

public class Statistics {
// ... some other methods to initialize DB  
public TailRecord[] tail(){
Statement stq;
ArrayList ar = new ArrayList();
try {
stq = conn.createStatement();
ResultSet rs = stq.executeQuery("select * from 
statistics order by
id desc limit 4");
while(rs.next()){
TailRecord tr = new TailRecord();
tr.setId(rs.getInt(1));
tr.setPage(rs.getString(2));
tr.setIp(rs.getString(3));
//tr.setAccessdate(rs.getDate(4));
//tr.setAccesstime(rs.getTime(5));
ar.add(tr);
}
} catch (SQLException e) {
e.printStackTrace();
}
TailRecord ret[] = (TailRecord[]) ar.toArray(new 
TailRecord[ar.size()]);
return ret;
}
}

And file TailRecord finally looks like:
/**
 * TailRecord.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
 */

package com.myfakedomain;

public class TailRecord  implements java.io.Serializable {
private i