Re: AxisC++ build problem

2006-03-02 Thread John Hawkins

Thanks for that !
I've created a JIRA for it so we don't
lose it.

regards,
John.








Tao Yang [EMAIL PROTECTED]

01/03/2006 23:20



Please respond to
Apache AXIS C User List axis-c-user@ws.apache.org





To
axis-c-user@ws.apache.org


cc



Subject
AxisC++ build problem








Hi,

I am now switching to build the latest svn checkout from the 1.5 release

on windows. However, another error jumps out:

buildVersionResource:
 [delete] Deleting 2 files from C:\opt\work\simdesk\axisc++\build
  [copy] Copying 1 file to C:\opt\work\simdesk\axisc++\build
   [cc] 5 total files to be compiled.
   [cc] URL.cpp
   [cc] PlatformSpecificWindows.cpp
   [cc] HTTPTransportException.cpp
   [cc] HTTPChannelInstantiator.cpp
   [cc] 
c:\opt\work\simdesk\axisc++\src\transport\axis3\HTTPChannel\HTTPChannel.hpp(31)

: fat
error C1083: Cannot open include file: 'tpipv6.h': No such file or 
directory
   [cc] HTTPChannel.cpp
   [cc] 
c:\opt\work\simdesk\axisc++\src\transport\axis3\HTTPChannel\HTTPChannel.hpp(31)

: fat
error C1083: Cannot open include file: 'tpipv6.h': No such file or 
directory
   [cc] Generating Code...

I think the tpipv6 is only needed for VC6. All the ipv6 stuff is in 
later winsock2.h. I am using VC7...
So I made a small change to accommodate this, pleae see the attached 
patch.txt for detail.

cheers,
Tao
Index: C:/opt/work/simdesk/axisc++/src/transport/axis3/HTTPChannel/HTTPChannel.hpp
===
--- C:/opt/work/simdesk/axisc++/src/transport/axis3/HTTPChannel/HTTPChannel.hpp
   
(revision 381684)
+++ C:/opt/work/simdesk/axisc++/src/transport/axis3/HTTPChannel/HTTPChannel.hpp
   
(working copy)
@@ -28,8 +28,10 @@
 
 #ifdef IPV6
 #include ws2tcpip.h
+#if P_HAS_IPV6  !defined IPPROTO_IPV6
 #include tpipv6.h // For IPv6 Tech Preview.
 #endif
+#endif
 
 // What version of WinSock is required
 const int  WS_VERSION_REQD  = 0x0101;
Index: C:/opt/work/simdesk/axisc++/src/transport/axis3/HTTPSSLChannel/HTTPSSLChannel.hpp
===
--- C:/opt/work/simdesk/axisc++/src/transport/axis3/HTTPSSLChannel/HTTPSSLChannel.hpp
   
(revision 381684)
+++ C:/opt/work/simdesk/axisc++/src/transport/axis3/HTTPSSLChannel/HTTPSSLChannel.hpp
   
(working copy)
@@ -30,8 +30,10 @@
 
 #ifdef IPV6
 #include ws2tcpip.h
+#if P_HAS_IPV6  !defined IPPROTO_IPV6
 #include tpipv6.h // For IPv6 Tech Preview.
 #endif
+#endif
 
 // What version of WinSock is required
 const int  WS_VERSION_REQD  = 0x0101;



[Axis2] Version 0.93 - How do I get a client through a proxy

2006-03-02 Thread Habib Ayob
Hi All

I'm relatively new to Axis2 and I seem to have a problem. I've created a web 
service to enable clients to download software updates. All is well except that 
some clients need to go through a proxy. I've tried:

HttpTransportProperties htprops = new HttpTransportProperties();
HttpTransportProperties.ProxyProperties proxyProperties = htprops.new 
ProxyProperties();

proxyProperties.setProxyName(localhost);
proxyProperties.setProxyPort(3128);

options.setProperty(HTTPConstants.PROXY, proxyProperties);
call.setClientOptions(options);

But my squid proxy access.log doesn't show any activity. It does show activity 
when I set my firefox proxy to this location. What am I doing wrong or missing?
 



NETCB SOLUTIONS (PTY) LTD
The Innovation Hub, Enterprise Building, 1st Floor, Unit U19 
Lynnwood, Pretoria 
P.O. Box 14449, Hatfield, Pretoria, 0028 
SOUTH AFRICA 
Tel. +27 12 844 0744 
Fax. +27 12 844 0763 

NetCB Solutions (Pty) Ltd trading as NetCB.com 
Reg. 2003/009745/07 
Directors: H de Bruin, JC du Toit, LJ Nel, CEO: JP Burgers 

This message and any attachments relating to official business of NetCB 
Solutions (Pty) Ltd (NETCB) is proprietary to NETCB and intended for the 
original addressee only. The message may contain information that is 
confidential and subject to legal privilege. Any views expressed in this 
message are those of the individual sender. 
If you have received this message in error, please notify the original sender 
immediately and destroy the original message. If you are not the intended 
recipient of this message, you are hereby notified that you must not 
disseminate, copy, use, distribute, or take any action in connection therewith. 
NETCB cannot ensure that the integrity of this communication has been 
maintained nor that it is free of errors, viruses, interception and/or 
interference. NETCB is not liable whatsoever for loss or damage resulting from 
the opening of this message and/or attachments and/or the use of the 
information contained in this message and/or attachments.


Connection Refused Error in User Guide Sample Client -- regardless of EPR

2006-03-02 Thread Sebastian J. Schultheiss
Hello!

We're trying to develop our own small axis web client. We have started by
running the client from the user guide. However, it's not cooperating. It seems
that it is not even trying to connect to the server yet, since the error message
(Connection Refused) is the same regardless of the URL we enter in the
EndpointReference targetEPR = new
EndpointReference(http://localhost/axis2/services/MyService;)

We have downloaded the latest release, 0.94 of AXIS2 as a WAR file and inserted
it into Tomcat 5.5.15, which works fine. The WSDL is generated, but directing
the Browser itself to the EPR gives us a 500 HTTP error (probably no cause for
concern). Therefore we conclude that the error has to be on the client side.

We have also followed instructions from other mailing list posts telling us to
copy the addressing.mar file to the ~/.axis/modules directory, which didn't
change the error message below.

Thank you for your time.

Regards,

-- Chris  Sebastian

-- 


- Deploying module : addressing
- I/O exception (java.net.ConnectException) caught when processing request:
Connection refused
- Retrying request
- I/O exception (java.net.ConnectException) caught when processing request:
Connection refused
- Retrying request
- I/O exception (java.net.ConnectException) caught when processing request:
Connection refused
- Retrying request
org.apache.axis2.AxisFault: Connection refused; nested exception is:
java.net.ConnectException: Connection refused; nested exception is:
org.apache.axis2.AxisFault: Connection refused; nested exception is:
java.net.ConnectException: Connection refused
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:245)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:449)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:317)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:267)
at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:393)
at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:326)
at userguide.clients.EchoBlockingClient.main(EchoBlockingClient.java:48)
Caused by: org.apache.axis2.AxisFault: Connection refused; nested exception is:
java.net.ConnectException: Connection refused
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:290)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:204)
... 6 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
at java.net.Socket.connect(Socket.java:507)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:139)
at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:124)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:100)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:284)
... 7 more


Re: Connection Refused Error in User Guide Sample Client -- regardless of EPR

2006-03-02 Thread robert
Try: 

http://localhost/axis2/listServices

When you see your service, it may be listed as faulty. Click on it, and you 
may see a stack trace. Your 500 error is probably a strong clue. You should 
also verify the results of listServices shows the Service EPR's as matching 
what you set on the client. 

Another option is to turn on logging at the debug level on both the client and 
server side. 

Lastly, you could try tcpmon or the soap monitor to see the headers comming in 
and out - probably not helpful in this case but keep it in mind for future 
problems. 

HTH,
Robert
http://www.braziloutsource.com/

Em Quinta 02 Março 2006 10:55, o Sebastian J. Schultheiss escreveu:
 Hello!

 We're trying to develop our own small axis web client. We have started by
 running the client from the user guide. However, it's not cooperating. It
 seems that it is not even trying to connect to the server yet, since the
 error message (Connection Refused) is the same regardless of the URL we
 enter in the EndpointReference targetEPR = new
 EndpointReference(http://localhost/axis2/services/MyService;)

 We have downloaded the latest release, 0.94 of AXIS2 as a WAR file and
 inserted it into Tomcat 5.5.15, which works fine. The WSDL is generated,
 but directing the Browser itself to the EPR gives us a 500 HTTP error
 (probably no cause for concern). Therefore we conclude that the error has
 to be on the client side.

 We have also followed instructions from other mailing list posts telling us
 to copy the addressing.mar file to the ~/.axis/modules directory, which
 didn't change the error message below.

 Thank you for your time.

 Regards,

 -- Chris  Sebastian

-- 


Re: Connection Refused Error in User Guide Sample Client -- regardless of EPR

2006-03-02 Thread Habib Ayob
Try using your port number as in localhost:8080

 On Thu, Mar 2, 2006 at  3:55 pm, in message [EMAIL PROTECTED],
[EMAIL PROTECTED] wrote: 
 Hello!
 
 We're trying to develop our own small axis web client. We have started by
 running the client from the user guide. However, it's not cooperating. It 
 seems
 that it is not even trying to connect to the server yet, since the error 
 message
 (Connection Refused) is the same regardless of the URL we enter in the
 EndpointReference targetEPR = new
 EndpointReference(http://localhost/axis2/services/MyService;)
 
 We have downloaded the latest release, 0.94 of AXIS2 as a WAR file and 
 inserted
 it into Tomcat 5.5.15, which works fine. The WSDL is generated, but 
 directing
 the Browser itself to the EPR gives us a 500 HTTP error (probably no cause 
 for
 concern). Therefore we conclude that the error has to be on the client side.
 
 We have also followed instructions from other mailing list posts telling us 
 to
 copy the addressing.mar file to the ~/.axis/modules directory, which didn't
 change the error message below.
 
 Thank you for your time.
 
 Regards,
 
 --  Chris  Sebastian




NETCB SOLUTIONS (PTY) LTD
The Innovation Hub, Enterprise Building, 1st Floor, Unit U19 
Lynnwood, Pretoria 
P.O. Box 14449, Hatfield, Pretoria, 0028 
SOUTH AFRICA 
Tel. +27 12 844 0744 
Fax. +27 12 844 0763 

NetCB Solutions (Pty) Ltd trading as NetCB.com 
Reg. 2003/009745/07 
Directors: H de Bruin, JC du Toit, LJ Nel, CEO: JP Burgers 

This message and any attachments relating to official business of NetCB 
Solutions (Pty) Ltd (NETCB) is proprietary to NETCB and intended for the 
original addressee only. The message may contain information that is 
confidential and subject to legal privilege. Any views expressed in this 
message are those of the individual sender. 
If you have received this message in error, please notify the original sender 
immediately and destroy the original message. If you are not the intended 
recipient of this message, you are hereby notified that you must not 
disseminate, copy, use, distribute, or take any action in connection therewith. 
NETCB cannot ensure that the integrity of this communication has been 
maintained nor that it is free of errors, viruses, interception and/or 
interference. NETCB is not liable whatsoever for loss or damage resulting from 
the opening of this message and/or attachments and/or the use of the 
information contained in this message and/or attachments.


Axis2 and Streaming

2006-03-02 Thread Lakshmi Chaparala
Hi,
I am trying to stream xml back to the client using axis2 implementation. 
Do I have to build OMElement before I stream xml or can I just send XML
across from the server? 

I used XMStreamReader to stream and also set builder caching to false but
axis2 blocks on the call and the client times out before it gets any
response.  

We have to send a large set of xml back to the client and if I build
OMElement, out server's memory jumps really high. I am trying to reduce this
memory footprint by streaming xml as a string and not as an OMElement. Can
this be done? 

Thanks

Lakshmi 






Re: how to debug Axis2 WSDL2Java

2006-03-02 Thread Noah Levitt
Yep, jdk 1.5 in linux.

2006/2/28, Ajith Ranabahu [EMAIL PROTECTED]:
 Hi Noah,
 Hmm..this is weird. The attached WSDL is clearly wrong! However I just
 tried it and seems to be working fine here. Are you on JDK 1.5 in
 Linux ? Knowing your environment helps us to recreate the problem.

 Ajith

 On 2/28/06, Noah Levitt [EMAIL PROTECTED] wrote:
  One wsdl that doesn't work is
  http://localhost:8080/axis2/services/version?wsdl, latest axis2 from
  svn, version.wsdl attached...
 
  $ java -classpath
  lib/axis2-0.95-SNAPSHOT.jar:lib/commons-logging-1.0.4.jar:lib/axis-wsdl4j-1.2.jar:lib/XmlSchema-1.0-SNAPSHOT.jar
  org.apache.axis2.wsdl.WSDL2Java -uri
  'http://localhost:8080/axis2/services/version?wsdl'
  Exception in thread main
  org.apache.axis2.wsdl.codegen.CodeGenerationException:
  org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL:
  The WSDL Types Schema does not define a targetNamespace in
  http://localhost:8080/axis2/services/version?wsdl
  at 
  org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:146)
  at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
  at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
  Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException:
  Invalid WSDL: The WSDL Types Schema does not define a targetNamespace
  in http://localhost:8080/axis2/services/version?wsdl
  at 
  org.apache.axis2.wsdl.codegen.extension.WSDLValidatorExtension.engage(WSDLValidatorExtension.java:70)
  at 
  org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:101)
  ... 2 more
 
  Noah
 
  2006/2/27, Ajith Ranabahu [EMAIL PROTECTED]:
   Hi,
   I have to admit that the WSDL2Java tool has poor error messages. The
   primary reason for the tool to have hideous error messages is that it
   does no validation so far. What you can do for now is to use something
   like the Capeclear SOA editor to validate the WSDL.
   If the WSDL is valid and the codegen still complains please attach the
   WSDL (you might need to file a JIRA as well :)). In the meantime we'll
   try to make the WSDL2java error messages more meaningful.
  
   Ajith
  
   On 2/27/06, Tachtevrenidis, Kosta [EMAIL PROTECTED] wrote:
   
Greg,
   
I have gotten that a lot too. What I do to get an idea of what is going 
on
is to use the wsewsdl3.exe tool to try to generate code for .NET, which 
have
a pretty good error message capability. Just my thoughts.
   
Kosta Tachtevrenidis
http://www.weyer.com/dmg
   
   
 
 From: Greg Michalopoulos [mailto:[EMAIL PROTECTED]
Sent: Monday, February 27, 2006 1:49 PM
To: axis-user@ws.apache.org
Subject: how to debug Axis2 WSDL2Java
   
   
   
I am getting exceptions when running WSDL2Java in Axis2, is there any 
way to
get feedback from the application what might be wrong with my WSDL?
   
Thanks,
Greg
   
  
  
   --
   Ajith Ranabahu
  
 
 
 


 --
 Ajith Ranabahu



Re: Axis2 and Streaming

2006-03-02 Thread Srinath Perera
If you create a new OMElement

File file= new File(line-item.xml);
 FileInputStream fis= new FileInputStream(file);
 XMLInputFactory xif= XMLInputFactory.newInstance();
 XMLStreamReader reader= xif.createXMLStreamReader(fis);
StAXOMBuilder builder= new StAXOMBuilder(reader);
 lineItem= builder.getDocumentElement();


On 3/2/06, Lakshmi Chaparala [EMAIL PROTECTED] wrote:
 Hi,
 I am trying to stream xml back to the client using axis2 implementation.
 Do I have to build OMElement before I stream xml or can I just send XML
 across from the server?

 I used XMStreamReader to stream and also set builder caching to false but
 axis2 blocks on the call and the client times out before it gets any
 response.

 We have to send a large set of xml back to the client and if I build
 OMElement, out server's memory jumps really high. I am trying to reduce this
 memory footprint by streaming xml as a string and not as an OMElement. Can
 this be done?

 Thanks

 Lakshmi







--

Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani


WS-I Compliance, SOAP Headers, and Wrapped document/literal

2006-03-02 Thread Scott McCoy
I'm really struggling here, after writing all of my service implementations using approaches discussed in previous threads in this list, I found I was not actually WS-I Compliant as my services were reliant upon the SOAPAction header, which the WS-I 
1.1 Profile says I must not do. So, I tried moving to a real document/wrapped convention, where I have a different document level element for each operation. This has effectively broken my handling of my SOAP header, however, and when I do include a SOAP Header explicitly in each message, it breaks the unwrapping of my document element and no longer do I get the method signature I desire.
I am of course using WSDL2JavaWhat I want to get is, for the example I have attached (unfortunately my implementation is a *lot* bigger than this and encompases many operations):public Account createAccount (Credentials credentials, Account account) {
}What I get instead:public Account createAccount (Account account) {}*OR*public Account createAccount (CreateAccount createAccount, Credentials credentials) {}--- Am I forced to do the unwrapping myself or live without actually having my soap header passed? How in the heck do I do this?
Thanks, Scott S. McCoy
?xml version=1.0 encoding=UTF-8?
!-- $Id$ --
!--
This WSDL is for generation only.  It is not WS-I compliant, and actually
in some spots might even been poorly formed WSDL.  This however makes it
easier to read, maintain, reduces duplication, and doesn't matter:  The
WSDL here is used only for code and further markup generation.  A WS-I
Compliant WSDL should then be generated from the code generated from this
WSDL, by Axis, automatically.
  --

wsdl:definitions name=urn:Account
 targetNamespace=http://plapi.enhance.com/service/account;
 xmlns:tns=http://plapi.enhance.com/service/account;
 xmlns:typens=http://plapi.enhance.com/service/account;
 xmlns:authns=http://plapi.enhance.com/credentials;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;

wsdl:types
xsd:schema targetNamespace=http://plapi.enhance.com/service/account;
xsd:include schemaLocation=account.xsd/
xsd:import namespace=http://plapi.enhance.com/credentials;
schemaLocation=credentials.xsd/
/xsd:schema
/wsdl:types

!--
wsdl:import namespace=http://plapi.enhance.com/service/account;
 location=account.xsd/
wsdl:import namespace=http://plapi.enhance.com/credentials;
 location=credentials.xsd/ --

wsdl:message name=Credentials
wsdl:part name=credentials element=authns:credentials/
/wsdl:message

wsdl:message name=createAccountRequest
wsdl:part name=createAccount element=tns:createAccount/
/wsdl:message

wsdl:message name=createAccountResponse
wsdl:part name=createAccountResponse element=tns:account/
/wsdl:message

wsdl:portType name=AccountService
wsdl:operation name=createAccount
wsdl:input message=tns:createAccountRequest/
wsdl:output message=tns:createAccountResponse/
/wsdl:operation
/wsdl:portType

wsdl:binding name=AccountSOAPBinding type=tns:AccountService
soap:binding style=wrapped
  transport=http://schemas.xmlsoap.org/soap/http/

wsdl:operation name=createAccount
  soap:operation soapAction=/
  wsdl:input name=createAccountRequest
soap:header use=literal part=credentials message=tns:Credentials/
soap:body use=literal parts=createAccount/
  /wsdl:input
  wsdl:output
soap:body use=literal/
  /wsdl:output
/wsdl:operation
/wsdl:binding

wsdl:service name=AccountWebService
wsdl:port name=AccountPort binding=tns:AccountSOAPBinding
soap:address
location=http://localhost:8080/axis/services/Account/
/wsdl:port
/wsdl:service
/wsdl:definitions


account.xsd
Description: Binary data


credentials.xsd
Description: Binary data


RE: Axis2 and Streaming

2006-03-02 Thread Lakshmi Chaparala
Our Axis2 service is currently implemented as you suggest and the xml is
streaming back to the client ok.  The problem we're having is that the
memory footprint on the server is larger than we'd like.

We are creating a large xml result for a query in our Axis2 service
implementation.  So we end up with a large xml result in a
ByteArrayOutputStream that we need to send back to the client.  Using the
standard implementation suggested below doubles the memory footprint on the
server to create the OMElement that is returned by the service
implementation method.  We'd like to be able to send the xml we have in
memory over the wire without creating the OMElment objects.  Even better,
we'd like to start streaming back the xml result as it is being created.  Is
there any way to implement an Axis2 service that either has OMElement
caching off when it streams back to the client or streams a result back to
the client as it is being created?

The code snippet below illustrates our failed attempts to make this work so
far:

//*** Standard Implementation
final ByteArrayOutputStream os = new
ByteArrayOutputStream();
//This method simply fills the os with xml
getDataObjectxml(snlModel, requiredAttrs, os);
ByteArrayInputStream bais = new
ByteArrayInputStream(os.toByteArray());
StAXOMBuilder builder = new StAXOMBuilder(bais);
//Turning off caching causes axis to hang on the retun
//It can't handle a non-caching OMElement
//builder.setCache(false); 
dataOut = builder.getDocumentElement();

//* Multi-threaded implementation
////set up the streaming connections
//final PipedOutputStream pos = new PipedOutputStream();
//PipedInputStream pis = new PipedInputStream(pos);
//This implementation hangs here, attempting to create the
xml stream reader
//XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamReader(pis);
//StAXOMBuilder builder = new StAXOMBuilder(parser);
//dataOut = builder.getDocumentElement();
//
////write to the stream on a separate thread
//Runnable xmlRunnable = new Runnable() {
//public void run() {
//try {
//getDataObjectxml(snlModel, requiredAttrs,
pos);
//} catch (Exception e) {
//e.printStackTrace();  //To change body of
catch statement use File | Settings | File Templates.
//}
//}
//};
//Thread serializerThread = new Thread(xmlRunnable);
//serializerThread.start();


Lakshmi Chaparala


-Original Message-
From: Srinath Perera [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 02, 2006 11:07 AM
To: axis-user@ws.apache.org
Subject: Re: Axis2 and Streaming

If you create a OM element as follows by providing a  Stream, the
stream is not really read
unless you accsess the OMElement. So If you create a OM element like
follwoing and use it in Axis2 .. it should do streaming

 File file= new File(line-item.xml);
 FileInputStream fis= new FileInputStream(file);
 XMLInputFactory xif= XMLInputFactory.newInstance();
 XMLStreamReader reader= xif.createXMLStreamReader(fis);
 StAXOMBuilder builder= new StAXOMBuilder(reader);
 OMElement lineItem= builder.getDocumentElement();

See http://www-128.ibm.com/developerworks/library/x-axiom/ for more info

--Srinath





Re: Axis2 and Streaming

2006-03-02 Thread Srinath Perera
Hi Lakshmi;

IMO Axis2 should handle this senario, If It do not, I think we have
met a bug. Can you create a simple Junit TestCase for the senario and
open a Jira Issue with it? (bug database)


Use a sample message as a string and remove the thread to simplefy the things
Thanks
Srinath

BTW (did you try to do the things in a one thread)?

Srinath



On 3/2/06, Lakshmi Chaparala [EMAIL PROTECTED] wrote:
 Our Axis2 service is currently implemented as you suggest and the xml is
 streaming back to the client ok.  The problem we're having is that the
 memory footprint on the server is larger than we'd like.

 We are creating a large xml result for a query in our Axis2 service
 implementation.  So we end up with a large xml result in a
 ByteArrayOutputStream that we need to send back to the client.  Using the
 standard implementation suggested below doubles the memory footprint on the
 server to create the OMElement that is returned by the service
 implementation method.  We'd like to be able to send the xml we have in
 memory over the wire without creating the OMElment objects.  Even better,
 we'd like to start streaming back the xml result as it is being created.  Is
 there any way to implement an Axis2 service that either has OMElement
 caching off when it streams back to the client or streams a result back to
 the client as it is being created?

 The code snippet below illustrates our failed attempts to make this work so
 far:

 //*** Standard Implementation
 final ByteArrayOutputStream os = new
 ByteArrayOutputStream();
 //This method simply fills the os with xml
 getDataObjectxml(snlModel, requiredAttrs, os);
 ByteArrayInputStream bais = new
 ByteArrayInputStream(os.toByteArray());
 StAXOMBuilder builder = new StAXOMBuilder(bais);
 //Turning off caching causes axis to hang on the retun
 //It can't handle a non-caching OMElement
 //builder.setCache(false);
 dataOut = builder.getDocumentElement();

 //* Multi-threaded implementation
 ////set up the streaming connections
 //final PipedOutputStream pos = new PipedOutputStream();
 //PipedInputStream pis = new PipedInputStream(pos);
 //This implementation hangs here, attempting to create the
 xml stream reader
 //XMLStreamReader parser =
 XMLInputFactory.newInstance().createXMLStreamReader(pis);
 //StAXOMBuilder builder = new StAXOMBuilder(parser);
 //dataOut = builder.getDocumentElement();
 //
 ////write to the stream on a separate thread
 //Runnable xmlRunnable = new Runnable() {
 //public void run() {
 //try {
 //getDataObjectxml(snlModel, requiredAttrs,
 pos);
 //} catch (Exception e) {
 //e.printStackTrace();  //To change body of
 catch statement use File | Settings | File Templates.
 //}
 //}
 //};
 //Thread serializerThread = new Thread(xmlRunnable);
 //serializerThread.start();


 Lakshmi Chaparala


 -Original Message-
 From: Srinath Perera [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 02, 2006 11:07 AM
 To: axis-user@ws.apache.org
 Subject: Re: Axis2 and Streaming

 If you create a OM element as follows by providing a  Stream, the
 stream is not really read
 unless you accsess the OMElement. So If you create a OM element like
 follwoing and use it in Axis2 .. it should do streaming

  File file= new File(line-item.xml);
  FileInputStream fis= new FileInputStream(file);
  XMLInputFactory xif= XMLInputFactory.newInstance();
  XMLStreamReader reader= xif.createXMLStreamReader(fis);
  StAXOMBuilder builder= new StAXOMBuilder(reader);
  OMElement lineItem= builder.getDocumentElement();

 See http://www-128.ibm.com/developerworks/library/x-axiom/ for more info

 --Srinath






--

Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani


java.lang.ClassNotFoundException: on server

2006-03-02 Thread Jiang, Peiyun
I'm new to axis. I got the following error and could not figure out what's 
wrong:

I'm running axis 1.3 on Tomcat 5.5 on Windows 2000. I installed axis with my 
own web application.
(1) The installation seems OK. I can get the pages at 
http://myserver.com:8080/myapp/happyaxis.jsp, 
http://myserver.com:8080/myapp/index.jsp. It behaves just like if you would 
haved installed axis along: http://myserver.com:8080/axis/happyaxis.jsp

(2) I coded a simple java class. I generated the other classes using java 
org.apache.axis.wsdl.Java2WSDL and java org.apache.axis.wsdl.WSL2Java following 
axis documentation and some web pages.

(3) I then deployed my web application to tomcat. The application was up and 
running. I can access the application from a browser.

(4) I then deployed the web service with java 
org.apache.axis.client.AdminClient.
I got: AdminDone processing/Admin. I think it went OK.
I did java org.apache.axis.client.AdminClient list and my web service was 
among the list.

(5) The problem is: I got Exceptions on the server side when I deployed using 
java org.apache.axis.client.AdminClient my.wsdd:

This was logged by tomcat server standard output:
- Exception:
java.lang.ClassNotFoundException: mypackage.MyClassSoapBindingSkeleton
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:186)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:142)

The class was in 
/myapp/WEB-INF/classes/mypackage/MyClassSoapBindingSkeleton.class. I'm sure 
it's there.

I could not access the web service.

I think the service was never up. The message AdminDone processing/Admin 
is misleading. I don't understand the java.lang.ClassNotFoundException 
exception. Is axis class loading different from normal servlet class loading?

I'm clueless. Please help.

-- Peiyun



Fwd: WSDD2Java + Admin util for deployment = Undescribably strange error...

2006-03-02 Thread Scott McCoy
-- Forwarded message --From: Scott McCoy [EMAIL PROTECTED]Date: Mar 2, 2006 11:33 AMSubject: Re: WSDD2Java + Admin util for deployment = Undescribably strange error...
To: [EMAIL PROTECTED]I've discovered that relying on the SOAPAction header does not comply
with WS-I Standards, but when trying to move to the wrapped document
literal syntax, where I have a different document element for each
method, I suddenly am not able to properly include my soap header
elements.

I tried using your suggestion here, attached is a little stub where I tried to do so, using what seems to be your suggestions here. Using another form I was able to get the header element included but that does not unwrap my createAccount method, and I'm unsure as to if it will properly map to the correct method.
When trying to simply omit the soapaction attribute from the operation definitions in my previous binding, axis just sort of stops working.Any input would be appreciated,Thanks,Scott S. McCoy

On 2/22/06, Anne Thomas Manes 
[EMAIL PROTECTED] wrote:

Scott, there are a bunch of errors in your WSDL. I've corrected a few of them (including notes about the corrections in comments):wsdl:definitions name=urn:Account
 targetNamespace=
http://plm.marchex.com/service/account xmlns:tns=

http://plm.marchex.com/service/account
 xmlns:typens=http://plm.marchex.com/service/account xmlns:authns=
http://plm.marchex.com/credentials
!-- wrong version of XML Schema xmlns:xsd=http://www.w3.org/1999/XMLSchema
 -- xmlns:xsd=
http://www.w3.org/2001/XMLSchema xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/
 xmlns:wsdl=
http://schemas.xmlsoap.org/wsdl/ wsdl:types!-- Use xsd:import or xsd:include to import xsd definitions -- xsd:schema targetNamespace=


http://plm.marchex.com/services/account xsd:include schemaLocation=account.xsd/ xsd:import namespace=

http://plm.marchex.com/credentials
 schemaLocation=credentials.xsd/ /xsd:schema /wsdl:types!-- Use wsdl:import only to import wsdl files wsdl:import namespace=
http://plm.marchex.com/service/account location=account.xsd/
 wsdl:import namespace=
http://plm.marchex.com/credentials location=credentials.xsd/--!-- If you want to use the wrapped convention, then you must define a  different set of request and response messages for each operation.
 The element referenced by the input message part must be a  wrapper element that has the same name as the operation. If you  prefer to not use the wrapped convention, you still must define a 
 unique input message for operation becuase the input element for  each operation must have a unique name.-- wsdl:message name=CredentialsOnly wsdl:part name=credentials element=authns:credentials/
 /wsdl:message wsdl:message name=AccountList wsdl:part name=accounts element=tns:accounts/ /wsdl:message-- You don't need to include the credentials part in each of your 
 messages. You can reference the CredentialsOnly message for  your header elements. (Definitely cleaner if you want to use the  same header in multiple messages.)-- wsdl:message name=AccountDetails
 wsdl:part name=credentials element=authns:credentials/ wsdl:part name=account element=tns:account/ /wsdl:message


 wsdl:message name=UserDetails wsdl:part name=credentials element=authns:credentials/ wsdl:part name=user element=tns:user/
 /wsdl:message !-- we need to return a different message than we accept -- wsdl:message name=AccountResponse wsdl:part name=accountlist element=tns:account/
 /wsdl:message wsdl:message name=UserResponse wsdl:part name=userlist element=tns:user/ /wsdl:message wsdl:message name=empty/
 wsdl:portType name=AccountPortType wsdl:operation name=createAccount wsdl:input message=tns:AccountDetails/ wsdl:output message=tns:AccountResponse/
 /wsdl:operation!-- When using document style, each input message must be unique.  You must define different input messages for createAccount,  updateAccount, and cancelAccount. I suggest you follow the 
 wrapped convention (create a wrapper element for each operation in which the wrapper element has the same name as the operation).-- wsdl:operation name=updateAccount
 wsdl:input message=tns:AccountDetails/ wsdl:output message=tns:empty/ /wsdl:operation wsdl:operation name=listAccounts
 wsdl:input message=tns:CredentialsOnly/ wsdl:output message=tns:AccountList/ /wsdl:operation wsdl:operation name=cancelAccount
 wsdl:input message=tns:AccountDetails/ wsdl:output message=tns:empty/ /wsdl:operation wsdl:operation name=createUser
 wsdl:input message=tns:UserDetails/ wsdl:output message=tns:UserResponse/ /wsdl:operation wsdl:operation name=updateUser
 wsdl:input message=tns:UserDetails/ wsdl:output message=tns:empty/ /wsdl:operation /wsdl:portType wsdl:binding name=AccountSOAPBinding type=tns:AccountPortType
!-- There's no such WSDL style as wrapped. Wrapped is simply a convention for document/literal that produces an RPC-like programming interface. soap:binding style=wrapped
 transport=http://schemas.xmlsoap.org/soap/http/--
 soap:binding 

Re: Connection Refused Error in User Guide Sample Client -- regardless of EPR

2006-03-02 Thread Sebastian J. Schultheiss
Hi Robert,

thanks for your fast reply. Our problem is solved now, but it wasn't due to a
faulty service. The following is only for users having the same error message:

We had changed the port to 80 on the local machine (tunneling) and recompiled
the source (That's why we didn't use localhost:8080, as Habib suggested). Then
we noticed that the .sh or .bat files of the example actually call the class
files stored in the .jar and not the ones in the directories (maybe that's a
java setting?)

After we fixed that, the test went through ok, both under Linux and Windows, on
the host where the server runs and on a remote machine.

Thanks for your help!

-- Sebi


 
 When you see your service, it may be listed as faulty. Click on it, and you 
 may see a stack trace. Your 500 error is probably a strong clue. You should 
 also verify the results of listServices shows the Service EPR's as matching 
 what you set on the client. 
 
 Another option is to turn on logging at the debug level on both the client 
 and 
 server side. 
 
 Lastly, you could try tcpmon or the soap monitor to see the headers comming 
 in 
 and out - probably not helpful in this case but keep it in mind for future 
 problems. 
 
 HTH,
 Robert
 http://www.braziloutsource.com/
 
 Em Quinta 02 Março 2006 10:55, o Sebastian J. Schultheiss escreveu:
 Hello!

 We're trying to develop our own small axis web client. We have started by
 running the client from the user guide. However, it's not cooperating. It
 seems that it is not even trying to connect to the server yet, since the
 error message (Connection Refused) is the same regardless of the URL we
 enter in the EndpointReference targetEPR = new
 EndpointReference(http://localhost/axis2/services/MyService;)

 We have downloaded the latest release, 0.94 of AXIS2 as a WAR file and
 inserted it into Tomcat 5.5.15, which works fine. The WSDL is generated,
 but directing the Browser itself to the EPR gives us a 500 HTTP error
 (probably no cause for concern). Therefore we conclude that the error has
 to be on the client side.

 We have also followed instructions from other mailing list posts telling us
 to copy the addressing.mar file to the ~/.axis/modules directory, which
 didn't change the error message below.

 Thank you for your time.

 Regards,

 -- Chris  Sebastian
 


Re: The AXIS engine could not find a target service to invoke!

2006-03-02 Thread jelly0961
Hi, 

Try to change your port 1000 into a one larger than
1024, and see if it works.

-Julie

--- Dionisio Fernandez
[EMAIL PROTECTED] wrote:

   Hello, I have a problem with axis. I have a .wsdl
 file and I want to build
 a server. I follow next steps:
 
   1)Deploy the wsdl:
   java org.apache.axis.wsdl.WSDL2Java --server-side
 --skeletonDeploy true
 file.wsdl
   This make some .java files and a .wsdd
   2)Compile the .java that made the previous steps
 and make a .jar with them.
   3)Copy .jar to the WEB-INF/lib directory in Axis.
   4)Run the server (i.e port 1000)
   5)Deploy the .wsdd:
   org.apache.axis.client.AdminClient
 path\deploy.wsdd -p 1000
   6)I load the web http://localhost:1000
 
   And it shows:
 
   And now... Some Services
   Service (wsdl)
   methodOne
   methodTwo
   ...
   AdminService (wsdl)
   AdminService
   Version (wsdl)
   getVersion
 
   Well, it shows all services I want, but when in
 Java I try to call one
 service (i.e closeSession):
 
   ServicePortType serv = (ServicePortType) new
 ServiceLocator().getService
 (new URL (http://localhost:1000/;));
   serv.methodOne(arg);
 
   It makes next Exception:
 
   The AXIS engine could not find a target service
 to invoke!  targetService
 is null
 
 
   Can you help me? Thanks.
 
 
 
 
 
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: major.minor version '49.0' is too recent... - where did I take the wrong version of what?

2006-03-02 Thread jelly0961
Hi,

Did you fix your problem? You can check which javac
and java you're running, especically check your
environment vraible PATH and JAVA_HOME.  It looks like
you're using a JDK 1.5 library in a JSDK 1.4 VM. This
happens when your system's default javac and java is
from the lower version.

For the tomcat 5.5.x, you have to use JDK1.5.0+ unless
you have the patch for JSDK1.4.x to run Tomcat.

-Julie

--- Dr. Exner [EMAIL PROTECTED] wrote:

 My axis-j 1.3 installation with stand alone tomcat
 5.5.15 and JRE 1.5.0_06 does not work:
 
 According to the instructions I copied
 activation.jar from jaf-1_0_2-upd2.zip, mailapi.jar
 from javamail-1_3_3_01.zip and xmlsec-1.3.0.jar into
 the ..\Tomcat 5.5\shared\lib. Checking the axis
 validation link I got the happy axis page, but
 selecting the call link I get errors like:
 
 Invalid class file format in

C:\Programme\Java\jre1.5.0_06\lib\rt.jar(java/util/Enumeration.class).
  
 The major.minor version '49.0' is too recent for
 this tool to understand. 
 (details see below)
 
 Moving back to JRE 1.4.2_10 even worse the whole
 axis startpage did not work any longer and I got
 much more major.minor version '49.0' is too recent
 errors. Auto-updating the JRE back to 1.5.0_6 (b05)
 the axis startpage still does not work anymore.
 
 == So where did I take the wrong version of what?
 ==
 
 
 - error message with initial
 installation using jre1.5.0_06:
 
 More details on the error message:
 
 - Exception:
 AxisFault
  faultCode:
 {http://xml.apache.org/axis/}Server.compileError
  faultSubcode: 
  faultString: Error while compiling: 
 C:\Programme\Apache\Tomcat
 5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java
  faultActor: 
  faultNode: 
  faultDetail: 
  {}Errors:Error compiling C:\Programme\Apache\Tomcat

5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java:
 Line 0, column 0: could not parse error message: 
 Note: sun.tools.javac.Main has been deprecated.
 error: Invalid class file format in

C:\Programme\Java\jre1.5.0_06\lib\rt.jar(java/util/Enumeration.class).
  The major.minor version '49.0' is too recent for
 this tool to understand.
 C:\Programme\Apache\Tomcat

5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java:22:
 Class java.util.Enumeration not found in import.
 
 Line 0, column 0: could not parse error message: 
 import java.util.Enumeration;
^
 error: Invalid class file format in

C:\Programme\Java\jre1.5.0_06\lib\rt.jar(java/util/ArrayList.class).
  The major.minor version '49.0' is too recent for
 this tool to understand.
 
 Line 23, column 7: Class java.util.ArrayList not
 found in import.
 Line 0, column 0: could not parse error message: 
 error: Invalid class file format in

C:\Programme\Java\jre1.5.0_06\lib\rt.jar(java/util/Iterator.class).
  The major.minor version '49.0' is too recent for
 this tool to understand.
 C:\Programme\Apache\Tomcat

5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java:24:
 Class java.util.Iterator not found in import.
 import java.util.Iterator;
 
 Line 0, column 0: could not parse error message:
 ^
 error: Invalid class file format in

C:\Programme\Java\jre1.5.0_06\lib\rt.jar(java/lang/Object.class).
  The major.minor version '49.0' is too recent for
 this tool to understand.
 C:\Programme\Apache\Tomcat

5.5\webapps\axis\WEB-INF\jwsClasses\EchoHeaders.java:29:
 Superclass java.lang.Object of class EchoHeaders not
 found.
 
 Line 0, column 0: no more tokens - could not parse
 error message:  public class EchoHeaders {
  ^
 8 errors, 1 warning
 
 
 
  


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


ActiveBPEL Designer and Axis

2006-03-02 Thread Mark Koch
Hello,

I'm trying to develop some BPEL processes using ActiveBPEL
Designer. How do I include BPEL extensions (like partnerLinkType,
etc.) in my Axis service definition so that a ?wsdl request
returns the normal WSDL with my BPEL extensions?  Is this
possible?

Thanks,
Mark Koch


Re: Fwd: WSDD2Java + Admin util for deployment = Undescribably strange error...

2006-03-02 Thread Dies Koper

Hello Scott,

There are still a bunch of errors in your WSDL and XSD files.
Maybe they are not related to the problems you are encountering, but it 
is also possible that Axis is choking on them and generates incorrect files.
#The first problem I noticed was that you put attributes before 
sequence in complexTypes.


Why don't you google for a WSDL and an XML validator and sort them out 
first?
On the WS-I web site there is also a Java-based tool to check whether 
your WSDL is WS-I BP compliant (it does not check everything, though).


I believe the WS-I test tool does not XML validate files.
I sometimes use Cape Clear's SOA editor for validating WSDL files, but 
never got it to check imported WSDL/XSD files.

If you find a good all-in-one checking tool, please let me know.

Regards,
Dies


Scott McCoy wrote:

-- Forwarded message --
From: Scott McCoy [EMAIL PROTECTED]
Date: Mar 2, 2006 11:33 AM
Subject: Re: WSDD2Java + Admin util for deployment = Undescribably strange
error...
To: [EMAIL PROTECTED]

I've discovered that relying on the SOAPAction header does not comply with
WS-I Standards, but when trying to move to the wrapped document literal
syntax, where I have a different document element for each method, I
suddenly am not able to properly include my soap header elements.

I tried using your suggestion here, attached is a little stub where I tried
to do so, using what seems to be your suggestions here.  Using another form
I was able to get the header element included but that does not unwrap my
createAccount method, and I'm unsure as to if it will properly map to the
correct method.

When trying to simply omit the soapaction attribute from the operation
definitions in my previous binding, axis just sort of stops working.

Any input would be appreciated,
Thanks,
Scott S. McCoy

On 2/22/06, Anne Thomas Manes [EMAIL PROTECTED] wrote:


Scott, there are a bunch of errors in your WSDL. I've corrected a few of
them (including notes about the corrections in comments):

wsdl:definitions name=urn:Account
 targetNamespace= http://plm.marchex.com/service/account;
 xmlns:tns= http://plm.marchex.com/service/account 
 xmlns:typens=http://plm.marchex.com/service/account;
 xmlns:authns= http://plm.marchex.com/credentials 
!-- wrong version of XML Schema
 xmlns:xsd=http://www.w3.org/1999/XMLSchema 
--
 xmlns:xsd= http://www.w3.org/2001/XMLSchema;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/ 
 xmlns:wsdl= http://schemas.xmlsoap.org/wsdl/;

wsdl:types
!-- Use xsd:import or xsd:include to import xsd definitions --

xsd:schema targetNamespace=http://plm.marchex.com/services/account

xsd:include schemaLocation=account.xsd/
xsd:import namespace= http://plm.marchex.com/credentials 
 schemaLocation=credentials.xsd/
/xsd:schema
/wsdl:types

!-- Use wsdl:import only to import wsdl files

wsdl:import namespace= http://plm.marchex.com/service/account;
 location=account.xsd/
wsdl:import namespace= http://plm.marchex.com/credentials;
 location=credentials.xsd/
--

!-- If you want to use the wrapped convention, then you must define a
 different set of request and response messages for each operation.
 The element referenced by the input message part must be a
 wrapper element that has the same name as the operation. If you
 prefer to not use the wrapped convention, you still must define a
 unique input message for operation becuase the input element for
 each operation must have a unique name.
--

wsdl:message name=CredentialsOnly
wsdl:part name=credentials element=authns:credentials/
/wsdl:message

wsdl:message name=AccountList
wsdl:part name=accounts element=tns:accounts/
/wsdl:message

-- You don't need to include the credentials part in each of your
  messages. You can reference the CredentialsOnly message for
  your header elements. (Definitely cleaner if you want to use the
  same header in multiple messages.)
--
wsdl:message name=AccountDetails
wsdl:part name=credentials element=authns:credentials/
wsdl:part name=account element=tns:account/
/wsdl:message

wsdl:message name=UserDetails
wsdl:part name=credentials element=authns:credentials/
wsdl:part name=user element=tns:user/
/wsdl:message

!-- we need to return a different message than we accept --
wsdl:message name=AccountResponse
wsdl:part name=accountlist element=tns:account/
/wsdl:message

wsdl:message name=UserResponse
wsdl:part name=userlist element=tns:user/
/wsdl:message

wsdl:message name=empty/

wsdl:portType name=AccountPortType
wsdl:operation name=createAccount
wsdl:input message=tns:AccountDetails/
wsdl:output message=tns:AccountResponse/

Re: Fwd: WSDD2Java + Admin util for deployment = Undescribably strange error...

2006-03-02 Thread Scott McCoy
Well I now know for sure that the XSD problems aren't the source, still, with the XSD problems fixed, the code I'm ending up with is still no good.Basically, the dilemma I am facing is that if I use the wrapped document/literal convention, it only works if I don't use SOAP Headers.
If I do use SOAP Headers, I end up requiring an object named after my method to hold what would be the method arguments if I wasn't using the wrapped convention. If I don't use this wrapper item, and I just include my arguments as the body parts, then I end up with problems routing my requests (I would be relying on the SOAPAction method anyway, and that would be problematic for WS-I compliance).
So how do I get the wrapping magic *and* explicit headers? It's flabbergasting how difficult that seems to be.On 3/2/06, Dies Koper 
[EMAIL PROTECTED] wrote:Hello Scott,There are still a bunch of errors in your WSDL and XSD files.
Maybe they are not related to the problems you are encountering, but itis also possible that Axis is choking on them and generates incorrect files.#The first problem I noticed was that you put attributes before
sequence in complexTypes.Why don't you google for a WSDL and an XML validator and sort them outfirst?On the WS-I web site there is also a Java-based tool to check whetheryour WSDL is WS-I BP compliant (it does not check everything, though).
I believe the WS-I test tool does not XML validate files.I sometimes use Cape Clear's SOA editor for validating WSDL files, butnever got it to check imported WSDL/XSD files.If you find a good all-in-one checking tool, please let me know.
Regards,DiesScott McCoy wrote: -- Forwarded message -- From: Scott McCoy [EMAIL PROTECTED] Date: Mar 2, 2006 11:33 AM
 Subject: Re: WSDD2Java + Admin util for deployment = Undescribably strange error... To: [EMAIL PROTECTED] I've discovered that relying on the SOAPAction header does not comply with
 WS-I Standards, but when trying to move to the wrapped document literal syntax, where I have a different document element for each method, I suddenly am not able to properly include my soap header elements.
 I tried using your suggestion here, attached is a little stub where I tried to do so, using what seems to be your suggestions here.Using another form I was able to get the header element included but that does not unwrap my
 createAccount method, and I'm unsure as to if it will properly map to the correct method. When trying to simply omit the soapaction attribute from the operation definitions in my previous binding, axis just sort of stops working.
 Any input would be appreciated, Thanks, Scott S. McCoy On 2/22/06, Anne Thomas Manes [EMAIL PROTECTED] wrote: Scott, there are a bunch of errors in your WSDL. I've corrected a few of
 them (including notes about the corrections in comments): wsdl:definitions name=urn:AccounttargetNamespace= 
http://plm.marchex.com/service/accountxmlns:tns= http://plm.marchex.com/service/account xmlns:typens=
http://plm.marchex.com/service/accountxmlns:authns= http://plm.marchex.com/credentials
  !-- wrong version of XML Schemaxmlns:xsd=http://www.w3.org/1999/XMLSchema  --xmlns:xsd= 
http://www.w3.org/2001/XMLSchemaxmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/ 
xmlns:wsdl= http://schemas.xmlsoap.org/wsdl/ wsdl:types !-- Use xsd:import or xsd:include to import xsd definitions --
 xsd:schema targetNamespace=http://plm.marchex.com/services/account  xsd:include schemaLocation=
account.xsd/ xsd:import namespace= http://plm.marchex.com/credentials schemaLocation=credentials.xsd
/ /xsd:schema /wsdl:types !-- Use wsdl:import only to import wsdl files wsdl:import namespace= 
http://plm.marchex.com/service/accountlocation=account.xsd/ wsdl:import namespace= 
http://plm.marchex.com/credentialslocation=credentials.xsd/ -- !-- If you want to use the wrapped convention, then you must define a
different set of request and response messages for each operation.The element referenced by the input message part must be awrapper element that has the same name as the operation. If you
prefer to not use the wrapped convention, you still must define aunique input message for operation becuase the input element foreach operation must have a unique name.
 -- wsdl:message name=CredentialsOnly wsdl:part name=credentials element=authns:credentials/ /wsdl:message
 wsdl:message name=AccountList wsdl:part name=accounts element=tns:accounts/ /wsdl:message
 -- You don't need to include the credentials part in each of your messages. You can reference the CredentialsOnly message for your header elements. (Definitely cleaner if you want to use the
 same header in multiple messages.) -- wsdl:message name=AccountDetails wsdl:part name=credentials element=authns:credentials/
 wsdl:part name=account element=tns:account/ /wsdl:message wsdl:message name=UserDetails wsdl:part name=credentials element=authns:credentials/
 wsdl:part name=user element=tns:user/ /wsdl:message !-- we need to return a different message than we accept 

[Axis2 0.94] No support for recursive data types?

2006-03-02 Thread Chuck Williams
WSDL2Java recurses infinitely in the SchemaCompiler when it encounters
recursion in the type definitions, e.g. for this single type:

xsd:schema targetNamespace=test
  xsd:element name=recursiveElement type=recursive/
  xsd:complexType name=recursive
xsd:sequence
  xsd:element name=sub type=test:recursive minOccurs=0/
/xsd:sequence
  /xsd:complexType
/xsd:schema

This definition validly describes a data strcuture like this one:

recursive
sub
sub/
/sub
/recursive

The attached WSDL file is a simple standalone example that causes the
infinite recursion.

Is there any way to do this, or is this a bug in axis2, or am I somehow
confused?  It looks to me like the fix could be as simple as adding the
name of the complexType being processed to the processedTypemap in
SchemaCompiler.processNamedComplexSchemaType() before it is processed,
rather than waiting until after it is processed, but I'm not sure if
that woudl really work and what other consequences it might have.  There
seem to be similar issues with other recursion control mechanisms in
SchemaCompiler, e.g. in processElement().

Thanks for any help,

Chuck

?xml version=1.0 encoding=UTF-8?
definitions name=Test targetNamespace=test xmlns=http://schemas.xmlsoap.org/wsdl/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:test=test

  types
xsd:schema targetNamespace=test
  xsd:element name=recursiveElement type=recursive/
  xsd:complexType name=recursive
xsd:sequence
  xsd:element name=sub type=test:recursive minOccurs=0/
/xsd:sequence
  /xsd:complexType
/xsd:schema
  /types

  message name=foo
part name=arg element=test:recursiveElement/
  /message
  message name=fooResponse
part name=response element=test:recursiveElement/
  /message

  portType name=testPort
operation name=foo
  input message=test:foo name=foo/
  output message=test:fooResponse name=fooResponse/
/operation
  /portType

  binding name=testBinding type=test:testPort
soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/
operation name=foo
  input name=foo
soap:body use=literal namespace=test/
  /input
  output name=fooResponse
soap:body use=literal namespace=test/
  /output
/operation
  /binding

  service name=testService
port name=testPort binding=test:testBinding
  soap:address location=http://foo.com/
/port
  /service
  

/definitions


Re: Axis2 and Streaming

2006-03-02 Thread Ajith Ranabahu
HI Lakshmi,
This is a bug if the streaming is not working. Theoretically we should
have the mentioned scenario working without a hitch.  I wonder why
Axis2 will hang when trying to create the reader.
As Srinath said it would be  helpful if there's a simple test case for
us to recreate the problem.


--
Ajith Ranabahu


Re: [Axis2 0.94] No support for recursive data types?

2006-03-02 Thread Ajith Ranabahu
Hi Chuck,
Hmm.. Valid scenario and humbly the recursive code that processes the
schema would have failed in this scenario. Your suggesion is right but
I'll have to go through the tests to figure out the consequences.

Ajith

On 3/3/06, Chuck Williams [EMAIL PROTECTED] wrote:
 WSDL2Java recurses infinitely in the SchemaCompiler when it encounters
 recursion in the type definitions, e.g. for this single type:

 xsd:schema targetNamespace=test
   xsd:element name=recursiveElement type=recursive/
   xsd:complexType name=recursive
 xsd:sequence
   xsd:element name=sub type=test:recursive minOccurs=0/
 /xsd:sequence
   /xsd:complexType
 /xsd:schema

 This definition validly describes a data strcuture like this one:

 recursive
 sub
 sub/
 /sub
 /recursive

 The attached WSDL file is a simple standalone example that causes the
 infinite recursion.

 Is there any way to do this, or is this a bug in axis2, or am I somehow
 confused?  It looks to me like the fix could be as simple as adding the
 name of the complexType being processed to the processedTypemap in
 SchemaCompiler.processNamedComplexSchemaType() before it is processed,
 rather than waiting until after it is processed, but I'm not sure if
 that woudl really work and what other consequences it might have.  There
 seem to be similar issues with other recursion control mechanisms in
 SchemaCompiler, e.g. in processElement().

 Thanks for any help,

 Chuck






--
Ajith Ranabahu