Re: test asynchronous functions

2007-10-26 Thread Charitha Kankanamge

Huitang Li wrote:


Hi,

I chose to use asynchronous calls in Axis2 client to transmit soap 
messages. The test class is generated by wsdl2java. When I tested it, 
the test did not fail even if the handler is set to fail() in the 
receiveErrorXXX() which in turn indeed got called.


This problem does not happen in synchronous calls.

Any solution to test asynchronous calls?


Thanks.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



If you want to test Axis2 asynchronus invocation, you can follow the 
simple scenario given below. It actually verifies the asynchronus 
invocation (Verifies that the client does not block while invoking a 
service).


- create a service implementation class (a pojo with one method)
- Add Thread.sleep(some milli second value); in the service method
- Generate a sync client
- In the client add system.out("something") after service call;
- call the service
- You will observe that the client responds only after the service is 
invoked. Until that, client hangs and stops processing.


- Now generate an asynchrouns client and follow the above steps. You 
will notice that the client responds (you may see the system.out value 
before getting the service response) before getting the service 
response. (Client does not block and continues its operation)


Hope this helps you.

Bye
Charitha

--
Charitha Kankanamge
WSO2 inc.
Flower Road, Colombo 07
+94 714268070

A bug in the hand is better than one as yet undetected



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: getting following exception in making client connection to the service

2007-10-26 Thread ROSSILLE Samuel
This Exception means that the class loader can't find the class  
javax.jms.ByteMessage.

This class is provided by one of the dependencies: 
geronimo-jms_1.1_spec-1.1.jar, so please check that this file is in your 
classpath.

Regards,

Samuel Rossille

-Message d'origine-
De : Shalab Goel [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 24 octobre 2007 19:21
À : axis-user@ws.apache.org
Objet : getting following exception in making client connection to the service 

Appreciate any help on what I might be missing.


java.lang.NoClassDefFoundError: javax/jms/BytesMessage
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at 
org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:516)
at 
org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:109)
at 
org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:640)
at 
org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:105)
at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:60)
at 
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:174)
at 
org.apache.axis2.client.ServiceClient.initializeTransports(ServiceClient.java:211)
at 
org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:138)
at org.apache.axis2.client.ServiceClient.(ServiceClient.java:133)
...
...


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AXIS2 and .NET Interop

2007-10-26 Thread Paul Fremantle
Maxim

What version of .NET is this? I notice that the SOAP 1.1 calls are all
working and SOAP1.2 isn't.

Try

stub._getServiceClient().getOptions().setSoapVersionURI(
org.apache.axis2.namespace.Constants.URI_SOAP11_ENV);

Paul


On 10/26/07, Maxim Geraskyn <[EMAIL PROTECTED]> wrote:
>
> > Is there any error log on the .NET side?
>
> Hmm, may be, have to check
>
> > I can't see anything really wrong with the Axis2 request. How did you
> > generate the client?
>
> As I mentioned xml part of request is fine. If I change headers it
> works perfectly.
> Client was generated by WSDL2Java
>
> 
>  classpathref="compile.classpath"
>   fork="true">
> 
>   
>   http://localhost:3353/Service1.asmx?WSDL"/>
>   
>   
>   
>   
>   
> 
> 
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com


[AXIS2] addHeader problem

2007-10-26 Thread morten.frank
Hi,

I had a thread going regarding (missing) attributes in a SOAP header
block.

Now I pinned the problem down to the following:

1) In the generated stub class the Object representing the header block
is build in the method org.apache.axiom.om.OMElement toOM(...)

The result of this is an element that when printed has the correct
structure:
http://metadata.ntpsoa.nordea.com/object";
schemaVersion="1.0">

Here the attribute schemaVersion is generated into the XML fragment
correctly.

2) After the element is built the header is added to the envelope:
addHeader(omElementmetadata1, env);

3) If the header is investigated immediate after this:
System.out.println(env.getHeader().toString());

the result is disappointing:
http://schemas.xmlsoap.org/soap/envelope/";>http://metadata.ntpsoa.nordea.com/object";
soapenv:mustUnderstand="0">...


So it seams, that the org.apache.axis2.client.Stub.addHeader method
overwrites the attributes part of the header block, or?

BR
Morten

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AXIS2 and .NET Interop

2007-10-26 Thread Paul Fremantle
Is there any error log on the .NET side?

I can't see anything really wrong with the Axis2 request. How did you
generate the client?

Paul

On 10/26/07, Maxim Geraskyn <[EMAIL PROTECTED]> wrote:
>
> Problem description
> --
> When I call .NET service ( Visual Studio 2005 ) using
> Axis2-generated client I got exception:
>
> Exception in thread "main" org.apache.axis2.AxisFault: The input
> stream for an incoming message is null.
> at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:71)
> at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:326)
> at org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:389)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:211)
> at org.apache.axis2.client.OperationClient.execute(OperationClient.java
> :163)
> at com.triniforce.soap.sample.Service1Stub.getStrings(Unknown Source)
> at inv.CallSoap.main(Unknown Source)
>
> Service function declaration
> ---
> String[] getString(String []);
>
> Schema
> --
>   
> 
>   
>  type="tns:ArrayOfString"/>
>   
> 
>   
>   
> 
>   
>  name="getStringsResult" type="tns:ArrayOfString"/>
>   
> 
>   
>
>   
> 
>nillable="true" type="s:string"/>
> 
>   
>
> Calling code
> --
> Service1Stub stub = new  Service1Stub(null,
> "http://localhost:8091/Service1.asmx";);
> GetStringsResponse res;
> GetStrings arg = new GetStrings();
> ArrayOfString arr1 = new ArrayOfString();
> arr1.setString(new String[]{"Str1", null, "Str2"});
> arg.setArg(arr1);
> stub.getStrings(arg);
>
> Request data
> --
> POST /Service1.asmx HTTP/1.1
> Content-Type: application/soap+xml; charset=UTF-8;
> action="http://triniforce.com/soap/sample/getStrings";
> User-Agent: Axis2
> Host: localhost:8091
> Transfer-Encoding: chunked
>
> 158
>  xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope
> "> xmlns:ns1="http://triniforce.com/soap/sample
> ">Str1StrStr2
> 0
>
> Answer data
> --
> HTTP/1.1 400 Bad Request
> Server: ASP.NET Development Server/8.0.0.0
> Date: Fri, 26 Oct 2007 08:45:01 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private
> Content-Length: 0
> Connection: Close
>
>
> Axis 1.4
> --
> Axis 1.4 works better
>
>
> Axis 1.4 request data
> --
> POST /Service1.asmx HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related, text/*
> User-Agent: Axis/1.4
> Host: localhost:8091
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: "http://triniforce.com/soap/sample/getStrings";
> Content-Length: 381
>
> Axis 1.4 response data
> ---
> HTTP/1.1 200 OK
> Server: ASP.NET Development Server/8.0.0.0
> Date: Fri, 26 Oct 2007 08:54:24 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private, max-age=0
> Content-Type: text/xml; charset=utf-8
> Content-Length: 408
> Connection: Close
>
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema
> "> xmlns="http://triniforce.com/soap/sample
> ">Str1Str3
>
> Some thoughts
> ---
> Axis 1.4 can call .NET service, but does not pass null element of array.
> Axis2 1.4 generates correct xml request, including null, but
> obviously .net does not understand http headeres.
>
> If I send xml generated by Axis2 using SoapUI tool, it works perect.
> SoapUI headers:
> POST /Service1.asmx HTTP/1.1
> Content-Type: text/xml;charset=UTF-8
> SOAPAction: "http://triniforce.com/soap/sample/getStrings";
> User-Agent: Jakarta Commons-HttpClient/3.0.1
> Host: localhost:8091
> Content-Length: 453
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com


RE: [AXIS2] SOAP Header problem

2007-10-26 Thread morten.frank
Hi again,

I have verified it to be a question solely about the attribute in the
SOAP Header block.
I have generated and executed a SOAP request through AXIS2. I have
copied the generated SOAP message and executed it again (SoapUI) this
time with the only difference that I manually inserted the missing
attribute.
And this works.

So - how do I force AXIS2 to accept the attribute I set on an Java
object representing the SOAP header block?

BR
Morten
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 25. oktober 2007 13:38
To: axis-user@ws.apache.org
Subject: RE: [AXIS2] SOAP Header problem

Thanks for the answer.

In my case I have no problem in reaching the correct service deployed.
The problem is, that the server-side will validate the incomming XML
document (SOAP message) and this validation fails because my generated
SOAP Header Block is not correct according to the XSD defining the
Header Block.

So I do not think the soapAction is a problem in this case.

I somehow need to force AXIS2 to use my attribute settings (Java part)
for generating the correct SOAP Header Block.

BR
Morten
 

-Original Message-
From: Jon Hanshew [mailto:[EMAIL PROTECTED]
Sent: 24. oktober 2007 20:45
To: axis-user@ws.apache.org
Subject: Re: [AXIS2] SOAP Header problem


The first thing that I see is that "soapAction" is null ("").

It needs to match your service call.  The Axis2 stub code generated by
wsdl2java does a "setAction" call that uses the wsdl value of soapAction
to identify the function to call on the service.

Hope this helps.
 

morten.frank wrote:
> 
> Hi,
> 
> I am currently evaluating different WS technologies to be used in a 
> client side Java environment.
> 
> The deal is, that we have a number of WSDL docs and they refer several

> XSD schemas for describing service input/output and data types etc.
> 
> My problem is, that somehow I can't get AXIS2 to generate the correct 
> SOAP header block according to our WSDL and XSD definitions.
> 
> Example:
> 
> A WSDL document defines the binding:
>type="tns:HelloWorldService">
>transport="http://schemas.xmlsoap.org/soap/http"/>
>   
>   
>   
>   
>message="common:MetadataMessage" part="metadata" use="literal"/>
>   
>   
>   
>   
>   
>   
>   
>   
>   
> 
> The thing to note is the  part="metadata" use="literal"/> part.
> 
> The Common.wsdl is imported in the above WSDL and is defined as:
>   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:tns="http://common.ntpsoa.nordea.com/common/wsdl/v1";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:md="http://metadata.ntpsoa.nordea.com/object";
> xmlns:err="http://error.ntpsoa.nordea.com/object/v1"; name="CommonWSDL"
> targetNamespace="http://common.ntpsoa.nordea.com/common/wsdl/v1";>
>   
>   
>namespace="http://metadata.ntpsoa.nordea.com/object";
> schemaLocation="../xsd/Metadata.xsd"/>
>namespace="http://error.ntpsoa.nordea.com/object/v1";
> schemaLocation="../xsd/Error.xsd"/>
>   
>   
>   
>   
>   
>   
>   
>   
> 
> 
> In the Metadata.xsd the following part is defined:
>  use="required">
> 
> 
> I have run the WSDL file through the wsdl2java to generate the client 
> stub.
> I have tried with ADT and XMLBeans as binding mechanism, both give the

> same result: In both cases I get an Java class representing the 
> Metadata. In both cases I am able to set the Java attributes for the 
> elements and attributes of the underlying XML document, including the 
> "schemaVersion".
> 
> Using XMLBeans I have tried to dump the headerblock generated by 
> XMLBeans. The result is:
>  xmlns:obj="http://metadata.ntpsoa.nordea.com/object";>
>   N231820
>   SE
>   String
>   String
>  
> 2007-10-22T15:29:55.625+02:00 am
> p>
>   String
>   false
> 
> 
> Note, that "schemaVersion" is set correctly at this point.
> 
> But in both cases, the actual SOAP message looks like:
> 
>   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>   
>xmlns="http://metadata.ntpsoa.nordea.com/object";
> soapenv:mustUnderstand="0">
>   N231820
>   SE
>   String
>   String
>   
> 2007-10-22T15:29:55.625+02:00
>   String
>   false
>   
>   
>   
>xmlns="http://helloworld.ntpref.nordea.com/object/v1";>
>   
>   Mjallo
>   
>   
>   
> 
> 
> It seems like

AXIS2 and .NET Interop

2007-10-26 Thread Maxim Geraskyn
Problem description
--
When I call .NET service ( Visual Studio 2005 ) using
Axis2-generated client I got exception:

Exception in thread "main" org.apache.axis2.AxisFault: The input
stream for an incoming message is null.
 at 
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:71)
 at 
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:326)
 at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389)
 at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
 at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
 at com.triniforce.soap.sample.Service1Stub.getStrings(Unknown Source)
 at inv.CallSoap.main(Unknown Source)

Service function declaration
---
String[] getString(String []);

Schema
--
  

  

  

  
  

  

  

  

  

  

  

Calling code
--
Service1Stub stub = new  Service1Stub(null,
"http://localhost:8091/Service1.asmx";);
GetStringsResponse res;
GetStrings arg = new GetStrings();
ArrayOfString arr1 = new ArrayOfString();
arr1.setString(new String[]{"Str1", null, "Str2"});
arg.setArg(arr1);
stub.getStrings(arg);

Request data
--
POST /Service1.asmx HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8;
action="http://triniforce.com/soap/sample/getStrings";
User-Agent: Axis2
Host: localhost:8091
Transfer-Encoding: chunked

158
http://www.w3.org/2003/05/soap-envelope";>http://triniforce.com/soap/sample";>Str1StrStr2
0

Answer data
--
HTTP/1.1 400 Bad Request
Server: ASP.NET Development Server/8.0.0.0
Date: Fri, 26 Oct 2007 08:45:01 GMT
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0
Connection: Close


Axis 1.4
--
Axis 1.4 works better


Axis 1.4 request data
--
POST /Service1.asmx HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: localhost:8091
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "http://triniforce.com/soap/sample/getStrings";
Content-Length: 381

Axis 1.4 response data
---
HTTP/1.1 200 OK
Server: ASP.NET Development Server/8.0.0.0
Date: Fri, 26 Oct 2007 08:54:24 GMT
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 408
Connection: Close

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

Some thoughts
---
Axis 1.4 can call .NET service, but does not pass null element of array.
Axis2 1.4 generates correct xml request, including null, but
obviously .net does not understand http headeres.

If I send xml generated by Axis2 using SoapUI tool, it works perect.
SoapUI headers:
POST /Service1.asmx HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: "http://triniforce.com/soap/sample/getStrings";
User-Agent: Jakarta Commons-HttpClient/3.0.1
Host: localhost:8091
Content-Length: 453

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Axis2] Custom object not returned correctly from webservice

2007-10-26 Thread Peter A. Kirk
Hi, I have made a webservice with the following classes.

I try to call this webservice from a c#/.net application, but the
returned object is filled with nulls - can anyone help me find out why?
As far as I can see I set the values in the return object. 

Do I need to do something to tell Axis2 that the class
Employees_WS_ReturnData should be available over a webservice? The c#
application does indeed know about this type, and does get an object
from the "easyData" method - this object is just not filled with data.


Thanks,
Peter


//
package dk.alphasolutions.niws.employees;

import javax.jws.*;

@WebService
public class Employees_WS
{
  @WebMethod
  public Employees_WS_ReturnData easyData()
  {
System.out.println("Easy Data");
Employees_WS_ReturnData o = new Employees_WS_ReturnData();
o.setEmail("peter");
return o;
  }
}

//
package dk.alphasolutions.niws.employees;

public class Employees_WS_ReturnData
{
  private String lastname = "a lastname";
  private String firstname;
  private String email;
  private String id;

  public String getLastname() 
  {
return lastname;
  }

  public void setLastname(String lastname) 
  {
this.lastname = lastname;
  }

  public String getFirstname() 
  {
return firstname;
  }

  public void setFirstname(String firstname) 
  {
this.firstname = firstname;
  }

  public String getEmail() 
  {
return email;
  }

  public void setEmail(String email) 
  {
this.email = email;
  }

  public String getId() 
  {
return id;
  }

  public void setId(String id) 
  {
this.id = id;
  }
}

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AXIS2 and .NET Interop

2007-10-26 Thread Maxim Geraskyn
> Is there any error log on the .NET side?

Hmm, may be, have to check

> I can't see anything really wrong with the Axis2 request. How did you
> generate the client?

As I mentioned xml part of request is fine. If I change headers it
works perfectly.
Client was generated by WSDL2Java


  

  
  http://localhost:3353/Service1.asmx?WSDL"/>
  
  
  
  
  
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SV: [Axis2] Custom object not returned correctly from webservice

2007-10-26 Thread Peter A. Kirk
I can return Strings and even String[] no problem, but not my custom
type which after all only contains strings?

Is it at all possible to return custom types from a java/axis2
webservice? I have found numerous other questions on the web regarding
this, but no definitive answer yet.

/Peter

-Oprindelig meddelelse-
Fra: Peter A. Kirk [mailto:[EMAIL PROTECTED] 
Sendt: 26. oktober 2007 11:43
Til: axis-user@ws.apache.org
Emne: [Axis2] Custom object not returned correctly from webservice

Hi, I have made a webservice with the following classes.

I try to call this webservice from a c#/.net application, but the
returned object is filled with nulls - can anyone help me find out why?
As far as I can see I set the values in the return object. 

Do I need to do something to tell Axis2 that the class
Employees_WS_ReturnData should be available over a webservice? The c#
application does indeed know about this type, and does get an object
from the "easyData" method - this object is just not filled with data.


Thanks,
Peter


//
package dk.alphasolutions.niws.employees;

import javax.jws.*;

@WebService
public class Employees_WS
{
  @WebMethod
  public Employees_WS_ReturnData easyData()
  {
System.out.println("Easy Data");
Employees_WS_ReturnData o = new Employees_WS_ReturnData();
o.setEmail("peter");
return o;
  }
}

//
package dk.alphasolutions.niws.employees;

public class Employees_WS_ReturnData
{
  private String lastname = "a lastname";
  private String firstname;
  private String email;
  private String id;

  public String getLastname() 
  {
return lastname;
  }

  public void setLastname(String lastname) 
  {
this.lastname = lastname;
  }

  public String getFirstname() 
  {
return firstname;
  }

  public void setFirstname(String firstname) 
  {
this.firstname = firstname;
  }

  public String getEmail() 
  {
return email;
  }

  public void setEmail(String email) 
  {
this.email = email;
  }

  public String getId() 
  {
return id;
  }

  public void setId(String id) 
  {
this.id = id;
  }
}

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Min/Max Inclusive

2007-10-26 Thread Jon Horsman
While on the topic of java2wsdl, I have a similar question.  I have
the following class.

public class Result
{
private boolean success;
private String errorMessage;

public Result(){}

public boolean getSuccess()
{
return success;
}
public void setSuccess(boolean success)
{
this.success = success;
}
public String getErrorMessage()
{
return errorMessage;
}

public void setErrorMessage(String errorMessage)
{
this.errorMessage = errorMessage;
}
}

In my wsdl i want to define an error message so thats its an
enumeration type as follows.










Currently after running java2wsdl i have to add that block manually
into the WSDL file, is there a way this can be done automatically by
java2wsdl?  I then need to change the Result type to point to the
simpleType ErrorMessage as follows.








Our SOAP API is currently changing a lot in our project as its early
on in the project, everytime it changes i need to regenerate the WSDL
and put in a ton of custon tweaks like this (and the min/max
inclusive, etc).  Is it possible to change my POJO files in a way that
this makes its way into the WSDL everytime its generated, i think
other SOAP frameworks support this, so i'm hoping axis does also.

Thanks.

Jon

On 10/25/07, Jon Horsman <[EMAIL PROTECTED]> wrote:
> Hey,
>
> I have some POJO classes that I use java2wsdl to generate a wsdl file
> for me.  I'm curious if there is any syntax that can be used in those
> java classes that will automatically add min/max inclusive to the
> generated WSDL?
>
> Lets say i have a simple class like
>
> public class TestClass
> {
>   private int testInt;
>   public void setTestInt(int i)
>   {
> testInt = i;
>   }
>   public int getTestInt()
>   {
> return 0;
>   }
> }
>
> Say that i want the WSDL to insure that setTestInt only accepts values
> between 0 and 10, is there a way to make a change in TestClass so that
> min/max Inclusive gets put into the WSDL or do you have to manually
> tweak the generated WSDL and add some like the following?
>
> 
> 
>
> Thanks,
>
> Jon.
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [AXIS2] addHeader problem

2007-10-26 Thread morten.frank
Hi,

I found the problem in the org.apache.axis2.client.Stub.addHeader
method:

Original:
protected void addHeader(OMElement omElementToadd, SOAPEnvelope envelop,
boolean mustUnderstand) {
SOAPHeaderBlock soapHeaderBlock =
envelop.getHeader().addHeaderBlock(omElementToadd.getLocalName(),omEleme
ntToadd.getNamespace());
soapHeaderBlock.setMustUnderstand(mustUnderstand);
OMNode omNode = null;
for (Iterator iter = omElementToadd.getChildren();
iter.hasNext();){
 omNode = (OMNode) iter.next();
 soapHeaderBlock.addChild(omNode);
}
}

I changed this into (overwritten in my own stub class):

protected void addHeader(OMElement omElementToadd, SOAPEnvelope envelop,
boolean mustUnderstand) {
  SOAPHeaderBlock soapHeaderBlock =
envelop.getHeader().addHeaderBlock(omElementToadd.getLocalName(),omEleme
ntToadd.getNamespace());
  //soapHeaderBlock.setMustUnderstand(mustUnderstand);
  OMNode omNode = null;
  for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();) {
omNode = (OMNode) iter.next();
soapHeaderBlock.addChild(omNode);
  }
  OMAttribute omAtt = null;
  for (Iterator i = omElementToadd.getAllAttributes(); i.hasNext(); ) {
omAtt = (OMAttribute)i.next();
soapHeaderBlock.addAttribute(omAtt);
  }
} 


This worked!

BR
Morten

 

-Original Message-
From: Frank, Morten 
Sent: 26. oktober 2007 12:29
To: axis-user@ws.apache.org
Subject: [AXIS2] addHeader problem

Hi,

I had a thread going regarding (missing) attributes in a SOAP header
block.

Now I pinned the problem down to the following:

1) In the generated stub class the Object representing the header block
is build in the method org.apache.axiom.om.OMElement toOM(...)

The result of this is an element that when printed has the correct
structure:
http://metadata.ntpsoa.nordea.com/object";
schemaVersion="1.0">

Here the attribute schemaVersion is generated into the XML fragment
correctly.

2) After the element is built the header is added to the envelope:
addHeader(omElementmetadata1, env);

3) If the header is investigated immediate after this:
System.out.println(env.getHeader().toString());

the result is disappointing:
http://schemas.xmlsoap.org/soap/envelope/";>http://metadata.ntpsoa.nordea.com/object";
soapenv:mustUnderstand="0">...


So it seams, that the org.apache.axis2.client.Stub.addHeader method
overwrites the attributes part of the header block, or?

BR
Morten

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AXIS2 and .NET Interop

2007-10-26 Thread Martin Gainty

SOAP 1.2 HTTP Binding
WCF implements SOAP 1.2 HTTP binding as described in the SOAP 1.2-part 2
(SOAP12Part2) specification with the following clarifications.

SOAP 1.2 introduced an optional action parameter for the
application/soap+xml media type. This parameter is useful to optimize
message dispatch without requiring that the body of the SOAP message be
parsed when WS-Addressing is not used.

  a.. R2221: The application/soap+xml action parameter, when present on a
SOAP 1.2 request, must match the soapAction attribute on the
wsoap12:operation element inside the corresponding WSDL binding.

  b.. R: The application/soap+xml action parameter, when present on a
SOAP 1.2 message, must match wsa:Action when WS-Addressing 2004/08 or
WS-Addressing 1.0 are used.

When WS-Addressing is disabled and an incoming request does not contain an
action parameter, message Action is considered not specified.

You are not using WS-Addressing therefore

the wsoap12:operation element of the SOAPAction attribute specified does not
match the Action specified

"http://triniforce.com/soap/sample/getStrings";

Assuming you have a properly formed WSDL
this Appears to be a bug in WSDL2Java utility
Suggest going to JIRA for more info
http://issues.apache.org/jira/browse/AXIS2

Anyone else?
HTH/
Martin--
 Original Message -
From: "Maxim Geraskyn" <[EMAIL PROTECTED]>
To: 
Sent: Friday, October 26, 2007 5:30 AM
Subject: AXIS2 and .NET Interop


> Problem description
> --
> When I call .NET service ( Visual Studio 2005 ) using
> Axis2-generated client I got exception:
>
> Exception in thread "main" org.apache.axis2.AxisFault: The input
> stream for an incoming message is null.
>  at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.j
ava:71)
>  at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
isOperation.java:326)
>  at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
n.java:389)
>  at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
peration.java:211)
>  at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>  at com.triniforce.soap.sample.Service1Stub.getStrings(Unknown Source)
>  at inv.CallSoap.main(Unknown Source)
>
> Service function declaration
> ---
> String[] getString(String []);
>
> Schema
> --
>   
> 
>   
>  type="tns:ArrayOfString"/>
>   
> 
>   
>   
> 
>   
>  name="getStringsResult" type="tns:ArrayOfString"/>
>   
> 
>   
>
>   
> 
>nillable="true" type="s:string"/>
> 
>   
>
> Calling code
> --
> Service1Stub stub = new  Service1Stub(null,
> "http://localhost:8091/Service1.asmx";);
> GetStringsResponse res;
> GetStrings arg = new GetStrings();
> ArrayOfString arr1 = new ArrayOfString();
> arr1.setString(new String[]{"Str1", null, "Str2"});
> arg.setArg(arr1);
> stub.getStrings(arg);
>
> Request data
> --
> POST /Service1.asmx HTTP/1.1
> Content-Type: application/soap+xml; charset=UTF-8;
> action="http://triniforce.com/soap/sample/getStrings";
> User-Agent: Axis2
> Host: localhost:8091
> Transfer-Encoding: chunked
>
> 158
> 
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
xmlns:ns1="http://triniforce.com/soap/sample";>Str1StrStr2<
/ns1:getStrings>
> 0
>
> Answer data
> --
> HTTP/1.1 400 Bad Request
> Server: ASP.NET Development Server/8.0.0.0
> Date: Fri, 26 Oct 2007 08:45:01 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private
> Content-Length: 0
> Connection: Close
>
>
> Axis 1.4
> --
> Axis 1.4 works better
>
>
> Axis 1.4 request data
> --
> POST /Service1.asmx HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related, text/*
> User-Agent: Axis/1.4
> Host: localhost:8091
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: "http://triniforce.com/soap/sample/getStrings";
> Content-Length: 381
>
> Axis 1.4 response data
> ---
> HTTP/1.1 200 OK
> Server: ASP.NET Development Server/8.0.0.0
> Date: Fri, 26 Oct 2007 08:54:24 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private, max-age=0
> Content-Type: text/xml; charset=utf-8
> Content-Length: 408
> Connection: Close
>
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
xmlns="http://triniforce.com/soap/sample";>Str1Str3
>
> Some thoughts
> ---
> Axis 1.4 can call .NET service, but does not pass null element of array.
> Axis2 1.4 gen

Re: Possible classloader issue - help needed

2007-10-26 Thread João Luís Pinto
Hi,


log1.debug("Loading " + url); //$NON-NLS-1$

ClassLoader loader =
AgentPlatformServiceMessageReceiverInOut.class.getClassLoader();
if (loader != null)
{
log1.debug("AgentPlatformServiceMessageReceiverInOut: " //$NON-NLS-1$
+ loader.getClass().getName());
getParents("AgentPlatformServiceMessageReceiverInOut", loader);
//$NON-NLS-1$
}

loader = Digester.class.getClassLoader();
if (loader != null)
{
log1.debug("Digester: " //$NON-NLS-1$
+ loader.getClass().getName());
getParents("Digester", loader); //$NON-NLS-1$
}

loader = CatalogBase.class.getClassLoader();
if (loader != null)
{
log1.debug("CatalogBase: " //$NON-NLS-1$
+ loader.getClass().getName());
getParents("CatalogBase", loader); //$NON-NLS-1$
}

configParser.parse(url);



private void getParents(String string, ClassLoader loader)
{
ClassLoader classLoader = loader;
while ((classLoader = classLoader.getParent()) != null)
{
log1.debug("Parent(" + string + "): " +
loader.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
}


On 10/26/07, Brennan Spies <[EMAIL PROTECTED]> wrote:
 > 1) Create a simple utility method that recurses up the classloading tree
> using ClassLoader.getParent()--stop when you get a null from this method.
> Print out the class name of each ClassLoader.
> 2) Also print out the class name of each ClassLoader for the classes of
> interest: Digester, CatalogBase (the impl version), ConfigCatalogRule,
> AgentPlatformServiceMessageReceiverInOut. Don't create a new instance; use a
> static reference to the class like
> 'ConfigCatalogRule.class.getClassLoader()'. To be thorough, you should check
> to see if this is null before doing getClass().getName().

I get:

[DEBUG] Loading
file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/chain-config.xml
[DEBUG] AgentPlatformServiceMessageReceiverInOut: java.net.URLClassLoader
[DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
java.net.URLClassLoader
[DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
java.net.URLClassLoader
[DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
java.net.URLClassLoader
[DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
java.net.URLClassLoader
[DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
java.net.URLClassLoader
[DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
java.net.URLClassLoader
[DEBUG] Digester: java.net.URLClassLoader
[DEBUG] Parent(Digester): java.net.URLClassLoader
[DEBUG] Parent(Digester): java.net.URLClassLoader
[DEBUG] Parent(Digester): java.net.URLClassLoader
[DEBUG] Parent(Digester): java.net.URLClassLoader
[DEBUG] Parent(Digester): java.net.URLClassLoader
[DEBUG] Parent(Digester): java.net.URLClassLoader
[DEBUG] CatalogBase: java.net.URLClassLoader
[DEBUG] Parent(CatalogBase): java.net.URLClassLoader
[DEBUG] Parent(CatalogBase): java.net.URLClassLoader
[DEBUG] Parent(CatalogBase): java.net.URLClassLoader
[DEBUG] Parent(CatalogBase): java.net.URLClassLoader
[DEBUG] Parent(CatalogBase): java.net.URLClassLoader
[DEBUG] Parent(CatalogBase): java.net.URLClassLoader
[ERROR] Begin event threw exception
java.lang.ClassNotFoundException: org.apache.commons.chain.impl.CatalogBase
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
(...)

I cannot do it for ConfigCatalogRule, because it has default (not
public) visibility [1].

[1] 
http://commons.apache.org/chain/xref/org/apache/commons/chain/config/ConfigCatalogRule.html

Thanks,

João

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AXIS2 and .NET Interop

2007-10-26 Thread Paul Fremantle
Martin

If you take another look the ;action= parameter is there. It just got split
to the next line.

Paul

On 10/27/00, Martin Gainty <[EMAIL PROTECTED]> wrote:
>
>
> SOAP 1.2 HTTP Binding
> WCF implements SOAP 1.2 HTTP binding as described in the SOAP 1.2-part 2
> (SOAP12Part2) specification with the following clarifications.
>
> SOAP 1.2 introduced an optional action parameter for the
> application/soap+xml media type. This parameter is useful to optimize
> message dispatch without requiring that the body of the SOAP message be
> parsed when WS-Addressing is not used.
>
>   a.. R2221: The application/soap+xml action parameter, when present on a
> SOAP 1.2 request, must match the soapAction attribute on the
> wsoap12:operation element inside the corresponding WSDL binding.
>
>   b.. R: The application/soap+xml action parameter, when present on a
> SOAP 1.2 message, must match wsa:Action when WS-Addressing 2004/08 or
> WS-Addressing 1.0 are used.
>
> When WS-Addressing is disabled and an incoming request does not contain an
> action parameter, message Action is considered not specified.
>
> You are not using WS-Addressing therefore
>
> the wsoap12:operation element of the SOAPAction attribute specified does
> not
> match the Action specified
>
> "http://triniforce.com/soap/sample/getStrings";
>
> Assuming you have a properly formed WSDL
> this Appears to be a bug in WSDL2Java utility
> Suggest going to JIRA for more info
> http://issues.apache.org/jira/browse/AXIS2
>
> Anyone else?
> HTH/
> Martin--
>  Original Message -
> From: "Maxim Geraskyn" <[EMAIL PROTECTED]>
> To: 
> Sent: Friday, October 26, 2007 5:30 AM
> Subject: AXIS2 and .NET Interop
>
>
> > Problem description
> > --
> > When I call .NET service ( Visual Studio 2005 ) using
> > Axis2-generated client I got exception:
> >
> > Exception in thread "main" org.apache.axis2.AxisFault: The input
> > stream for an incoming message is null.
> >  at
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.j
> ava:71)
> >  at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse
> (OutInAx
> isOperation.java:326)
> >  at
> org.apache.axis2.description.OutInAxisOperationClient.send
> (OutInAxisOperatio
> n.java:389)
> >  at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl
> (OutInAxisO
> peration.java:211)
> >  at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> >  at com.triniforce.soap.sample.Service1Stub.getStrings(Unknown Source)
> >  at inv.CallSoap.main(Unknown Source)
> >
> > Service function declaration
> > ---
> > String[] getString(String []);
> >
> > Schema
> > --
> >   
> > 
> >   
> >  > type="tns:ArrayOfString"/>
> >   
> > 
> >   
> >   
> > 
> >   
> >  > name="getStringsResult" type="tns:ArrayOfString"/>
> >   
> > 
> >   
> >
> >   
> > 
> >> nillable="true" type="s:string"/>
> > 
> >   
> >
> > Calling code
> > --
> > Service1Stub stub = new  Service1Stub(null,
> > "http://localhost:8091/Service1.asmx";);
> > GetStringsResponse res;
> > GetStrings arg = new GetStrings();
> > ArrayOfString arr1 = new ArrayOfString();
> > arr1.setString(new String[]{"Str1", null, "Str2"});
> > arg.setArg(arr1);
> > stub.getStrings(arg);
> >
> > Request data
> > --
> > POST /Service1.asmx HTTP/1.1
> > Content-Type: application/soap+xml; charset=UTF-8;
> > action="http://triniforce.com/soap/sample/getStrings";
> > User-Agent: Axis2
> > Host: localhost:8091
> > Transfer-Encoding: chunked
> >
> > 158
> >  >
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope
> "> etStrings
> >
> xmlns:ns1="http://triniforce.com/soap/sample
> ">Str1
> :string>StrStr2<
> /ns1:getStrings>
> > 0
> >
> > Answer data
> > --
> > HTTP/1.1 400 Bad Request
> > Server: ASP.NET Development Server/8.0.0.0
> > Date: Fri, 26 Oct 2007 08:45:01 GMT
> > X-AspNet-Version: 2.0.50727
> > Cache-Control: private
> > Content-Length: 0
> > Connection: Close
> >
> >
> > Axis 1.4
> > --
> > Axis 1.4 works better
> >
> >
> > Axis 1.4 request data
> > --
> > POST /Service1.asmx HTTP/1.0
> > Content-Type: text/xml; charset=utf-8
> > Accept: application/soap+xml, application/dime, multipart/related,
> text/*
> > User-Agent: Axis/1.4
> > Host: localhost:8091
> > Cache-Control: no-cache
> > Pragma: no-cache
> > SOAPAction: "http://triniforce.com/soap/sample/getStrings";
> > Content-Length: 381
> >
> > Axis 1.4 response data
> > ---
> > HTTP/1.1 200 OK
> > Server: ASP.NET Development Server/8.0.0.0
> > Date: Fri, 26 Oct 2007 08:54:24

Re: Possible classloader issue - help needed

2007-10-26 Thread robert lazarski
I'm comming late into this thread and don't see the whole problem
here, but beyond what Brennan suggested this also works for me:

 this.getClass().getProtectionDomain().getCodeSource().getLocation());

Where 'this' could be any object reference. Also, don't forget the
happy axis page shows the jar locations of everything loaded.

HTH,
Robert

On 10/26/07, João Luís Pinto <[EMAIL PROTECTED]> wrote:
> Hi,
>
> 
> log1.debug("Loading " + url); //$NON-NLS-1$
>
> ClassLoader loader =
> AgentPlatformServiceMessageReceiverInOut.class.getClassLoader();
> if (loader != null)
> {
> log1.debug("AgentPlatformServiceMessageReceiverInOut: " //$NON-NLS-1$
> + loader.getClass().getName());
> getParents("AgentPlatformServiceMessageReceiverInOut", loader);
> //$NON-NLS-1$
> }
>
> loader = Digester.class.getClassLoader();
> if (loader != null)
> {
> log1.debug("Digester: " //$NON-NLS-1$
> + loader.getClass().getName());
> getParents("Digester", loader); //$NON-NLS-1$
> }
>
> loader = CatalogBase.class.getClassLoader();
> if (loader != null)
> {
> log1.debug("CatalogBase: " //$NON-NLS-1$
> + loader.getClass().getName());
> getParents("CatalogBase", loader); //$NON-NLS-1$
> }
>
> configParser.parse(url);
> 
>
> 
> private void getParents(String string, ClassLoader loader)
> {
> ClassLoader classLoader = loader;
> while ((classLoader = classLoader.getParent()) != null)
> {
> log1.debug("Parent(" + string + "): " +
> loader.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
> }
> }
> 
>
> On 10/26/07, Brennan Spies <[EMAIL PROTECTED]> wrote:
>  > 1) Create a simple utility method that recurses up the classloading tree
> > using ClassLoader.getParent()--stop when you get a null from this method.
> > Print out the class name of each ClassLoader.
> > 2) Also print out the class name of each ClassLoader for the classes of
> > interest: Digester, CatalogBase (the impl version), ConfigCatalogRule,
> > AgentPlatformServiceMessageReceiverInOut. Don't create a new instance; use a
> > static reference to the class like
> > 'ConfigCatalogRule.class.getClassLoader()'. To be thorough, you should check
> > to see if this is null before doing getClass().getName().
>
> I get:
>
> [DEBUG] Loading
> file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/chain-config.xml
> [DEBUG] AgentPlatformServiceMessageReceiverInOut: java.net.URLClassLoader
> [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
> java.net.URLClassLoader
> [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
> java.net.URLClassLoader
> [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
> java.net.URLClassLoader
> [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
> java.net.URLClassLoader
> [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
> java.net.URLClassLoader
> [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut):
> java.net.URLClassLoader
> [DEBUG] Digester: java.net.URLClassLoader
> [DEBUG] Parent(Digester): java.net.URLClassLoader
> [DEBUG] Parent(Digester): java.net.URLClassLoader
> [DEBUG] Parent(Digester): java.net.URLClassLoader
> [DEBUG] Parent(Digester): java.net.URLClassLoader
> [DEBUG] Parent(Digester): java.net.URLClassLoader
> [DEBUG] Parent(Digester): java.net.URLClassLoader
> [DEBUG] CatalogBase: java.net.URLClassLoader
> [DEBUG] Parent(CatalogBase): java.net.URLClassLoader
> [DEBUG] Parent(CatalogBase): java.net.URLClassLoader
> [DEBUG] Parent(CatalogBase): java.net.URLClassLoader
> [DEBUG] Parent(CatalogBase): java.net.URLClassLoader
> [DEBUG] Parent(CatalogBase): java.net.URLClassLoader
> [DEBUG] Parent(CatalogBase): java.net.URLClassLoader
> [ERROR] Begin event threw exception
> java.lang.ClassNotFoundException: org.apache.commons.chain.impl.CatalogBase
> at 
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
> (...)
>
> I cannot do it for ConfigCatalogRule, because it has default (not
> public) visibility [1].
>
> [1] 
> http://commons.apache.org/chain/xref/org/apache/commons/chain/config/ConfigCatalogRule.html
>
> Thanks,
>
> João
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



wsdl2java mixed=true support?

2007-10-26 Thread ROBINSON JULIEN

Hi all,

I've got a legacy WSDL that contains a complexType with the parameter
mixed="true"

I've tried generating Java using Axis2, and the generated Java is the
same with and without this parameter.

My question is: is this parameter supported?
What should be generated?

Thanks for any info!
Julien

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AXIS2 and .NET Interop

2007-10-26 Thread Maxim Geraskyn
Paul,

> What version of .NET is this?

I'm using Visual Studio 2005, .NET Framework v2.0.50727

> Try
>
> stub._getServiceClient().getOptions().setSoapVersionURI(org.apache.axis2.namespace.Constants.URI_SOAP11_ENV
> );

Hmm, same result

Request:

POST /Service1.asmx HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "http://triniforce.com/soap/sample/getStrings";
User-Agent: Axis2
Host: localhost:8091
Transfer-Encoding: chunked

18e
http://schemas.xmlsoap.org/soap/envelope/";>http://triniforce.com/soap/sample";>Str1http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="1"
/>Str2
0


Response:
--

HTTP/1.1 400 Bad Request
Server: ASP.NET Development Server/8.0.0.0
Date: Fri, 26 Oct 2007 12:59:48 GMT
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0
Connection: Close

Same XML with another headers works perfect
---
POST /Service1.asmx HTTP/1.1
Content-Type: text/xml;charset=UTF-8
SOAPAction: "http://triniforce.com/soap/sample/getStrings";
User-Agent: Jakarta Commons-HttpClient/3.0.1
Host: localhost:8091
Content-Length: 398

http://schemas.xmlsoap.org/soap/envelope/";>http://triniforce.com/soap/sample";>Str1http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="1"
/>Str2

HTTP/1.1 200 OK
Server: ASP.NET Development Server/8.0.0.0
Date: Fri, 26 Oct 2007 13:09:39 GMT
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 433
Connection: Close

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AXIS2 and .NET Interop

2007-10-26 Thread Paul Fremantle
Maybe its HTTP chunking? I notice that the working versions don't use that.

Try turning it off like this:

stub.getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,
Boolean.FALSE);


Paul

On 10/26/07, Maxim Geraskyn <[EMAIL PROTECTED]> wrote:
>
> Paul,
>
> > What version of .NET is this?
>
> I'm using Visual Studio 2005, .NET Framework v2.0.50727
>
> > Try
> >
> > stub._getServiceClient().getOptions().setSoapVersionURI(
> org.apache.axis2.namespace.Constants.URI_SOAP11_ENV
> > );
>
> Hmm, same result
>
> Request:
> 
> POST /Service1.asmx HTTP/1.1
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "http://triniforce.com/soap/sample/getStrings";
> User-Agent: Axis2
> Host: localhost:8091
> Transfer-Encoding: chunked
>
> 18e
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> "> xmlns:ns1="http://triniforce.com/soap/sample
> ">Str1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="1"
>
> />Str2
> 0
>
>
> Response:
> --
>
> HTTP/1.1 400 Bad Request
> Server: ASP.NET Development Server/8.0.0.0
> Date: Fri, 26 Oct 2007 12:59:48 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private
> Content-Length: 0
> Connection: Close
>
> Same XML with another headers works perfect
> ---
> POST /Service1.asmx HTTP/1.1
> Content-Type: text/xml;charset=UTF-8
> SOAPAction: "http://triniforce.com/soap/sample/getStrings";
> User-Agent: Jakarta Commons-HttpClient/3.0.1
> Host: localhost:8091
> Content-Length: 398
>
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> "> xmlns:ns1="http://triniforce.com/soap/sample
> ">Str1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:nil="1"
>
> />Str2
>
> HTTP/1.1 200 OK
> Server: ASP.NET Development Server/8.0.0.0
> Date: Fri, 26 Oct 2007 13:09:39 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private, max-age=0
> Content-Type: text/xml; charset=utf-8
> Content-Length: 433
> Connection: Close
>
>  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema
> "> xmlns="http://triniforce.com/soap/sample
> ">Str1 xsi:nil="true"
> />Str2
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com


Re: test asynchronous functions

2007-10-26 Thread Deepal jayasinghe
Huitang Li wrote:
> Hi,
>
> I chose to use asynchronous calls in Axis2 client to transmit soap
> messages. The test class is generated by wsdl2java. When I tested it,
> the test did not fail even if the handler is set to fail() in the
> receiveErrorXXX() which in turn indeed got called.
>
> This problem does not happen in synchronous calls.
>
> Any solution to test asynchronous calls?
please have a look at the following

http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html


Thanks
Deepal

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Axis2 WSDL2Java error during service skeliton/stub generation

2007-10-26 Thread Kiran Kumar Sriram
Hello All  I am getting this error when i try to generate Service Skeleton code 
from a WSDL file. This is a new service and we are trying to go in WSDL first 
approach. We need wsdl to be in Document/literal Wrapped style in order to be 
interoperable with .Net framework. .Net generated client stubs with out any 
problem but Axis2 WSDL2Java is giving this exception during service skeleton 
and client generation times. This is pretty simple WSDL file with just two 
methods in it. We are trying to generate skeleton and clients in UNWrapped 
mode. C:\Code\Axis14ClientTest\Axis14ClientTest1>java.exe 
-Djava.ext.dirs=C:\Softwares\axis2-1.3-bin\axis2-1.3\lib; 
org.apache.axis2.wsdl.WSDL2Java -s -ss -uw -sd -dadb -uri 
PCMConnection.wsdllog4j:WARN No appenders could be found for logger 
(org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).log4j:WARN Please 
initialize the log4j system properly.Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not determine the 
schema type for the set_PortalVariableResponseat 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:265)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)at 
org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)Caused by: 
org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not determine the 
schema type for the set_PortalVariableResponseat 
org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walk  I have 
attached WSDL file with this mail. Just to let you know .Net is fine with this 
WSDL but not Axis2 WSDL2Java tool. Any help is greatly appreciated. Thank you, 
Kiran 
_
Peek-a-boo FREE Tricks & Treats for You!
http://www.reallivemoms.com?ocid=TXT_TAGHM&loc=us

Re: Unrecognized elment in response xml (axis 2)

2007-10-26 Thread Deepal Jayasinghe
hi harsha,
I know the issues and I have encountered the problem a several times ,
it was mainly due to namespaece context handling in underline xml
parser. Can you please find the stax parser you can find in resin. In
the meantime please create a JIRA

Thanks
Deepal
> Hi
> I am trying to port web services deployed  on resin-2.1.20 (axis2)
> to resin-3.1.3 server. The response xml file contains some
> unrecognizable element which gives parse exception. The exception is
> given below
>
> Reference to undeclared namespace prefix: 'xsi'. Error processing
> resource 'file:///C:/Documents and Settings/harsharaja/De...
>
>  xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>..
>
>
> We get some element in the response like
>
>  xmlns:ax21="http://beans.ws30.xora.com/xsd";>
>
> but URI is not coming in the xml header. We face problem when the data
> type is String and the value is null.
>
> I am using axis2-1.3 , Resin-3.1.3 server, JDK 1.5 and using SOAP-UI
> tool for testing. I have attached the wsdl (TimeTrackServices301.xml) and
> the response xml (Response.xml). Try to open Response.xml in Internet
> Explorer you will get the above error message. Please help me to solve
> this problem.
>
> With regards
> Harsha
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> 
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Thanks,
Deepal

"The highest tower is built one brick at a time"



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FW: Axis2 WSDL2Java error during service skeliton/stub generation

2007-10-26 Thread Kiran Kumar Sriram
Here is the WSDL file attached with this mail.


From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Axis2 WSDL2Java error during 
service skeliton/stub generationDate: Fri, 26 Oct 2007 10:34:30 -0400


Hello All  I am getting this error when i try to generate Service Skeleton code 
from a WSDL file. This is a new service and we are trying to go in WSDL first 
approach. We need wsdl to be in Document/literal Wrapped style in order to be 
interoperable with .Net framework. .Net generated client stubs with out any 
problem but Axis2 WSDL2Java is giving this exception during service skeleton 
and client generation times. This is pretty simple WSDL file with just two 
methods in it. We are trying to generate skeleton and clients in UNWrapped 
mode. C:\Code\Axis14ClientTest\Axis14ClientTest1>java.exe 
-Djava.ext.dirs=C:\Softwares\axis2-1.3-bin\axis2-1.3\lib; 
org.apache.axis2.wsdl.WSDL2Java -s -ss -uw -sd -dadb -uri 
PCMConnection.wsdllog4j:WARN No appenders could be found for logger 
(org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).log4j:WARN Please 
initialize the log4j system properly.Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not determine the 
schema type for the set_PortalVariableResponseat 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:265)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)at 
org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)Caused by: 
org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not determine the 
schema type for the set_PortalVariableResponseat 
org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walk  I have 
attached WSDL file with this mail. Just to let you know .Net is fine with this 
WSDL but not Axis2 WSDL2Java tool. Any help is greatly appreciated. Thank you, 
Kiran 

Peek-a-boo FREE Tricks & Treats for You! Get 'em! 
_
Climb to the top of the charts!  Play Star Shuffle:  the word scramble 
challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct

PCMConnection.wsdl
Description: application/xml
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: SV: [Axis2] Custom object not returned correctly from webservice

2007-10-26 Thread Deepal jayasinghe
Peter A. Kirk wrote:
> I can return Strings and even String[] no problem, but not my custom
> type which after all only contains strings?
>
> Is it at all possible to return custom types from a java/axis2
> webservice? I have found numerous other questions on the web regarding
>   
Yes you can.

Thanks
Deepal
> this, but no definitive answer yet.
>
> /Peter
>
> -Oprindelig meddelelse-
> Fra: Peter A. Kirk [mailto:[EMAIL PROTECTED] 
> Sendt: 26. oktober 2007 11:43
> Til: axis-user@ws.apache.org
> Emne: [Axis2] Custom object not returned correctly from webservice
>
> Hi, I have made a webservice with the following classes.
>
> I try to call this webservice from a c#/.net application, but the
> returned object is filled with nulls - can anyone help me find out why?
> As far as I can see I set the values in the return object. 
>
> Do I need to do something to tell Axis2 that the class
> Employees_WS_ReturnData should be available over a webservice? The c#
> application does indeed know about this type, and does get an object
> from the "easyData" method - this object is just not filled with data.
>
>
> Thanks,
> Peter
>
>
> //
> package dk.alphasolutions.niws.employees;
>
> import javax.jws.*;
>
> @WebService
> public class Employees_WS
> {
>   @WebMethod
>   public Employees_WS_ReturnData easyData()
>   {
> System.out.println("Easy Data");
> Employees_WS_ReturnData o = new Employees_WS_ReturnData();
> o.setEmail("peter");
> return o;
>   }
> }
>
> //
> package dk.alphasolutions.niws.employees;
>
> public class Employees_WS_ReturnData
> {
>   private String lastname = "a lastname";
>   private String firstname;
>   private String email;
>   private String id;
>   
>   public String getLastname() 
>   {
> return lastname;
>   }
>   
>   public void setLastname(String lastname) 
>   {
> this.lastname = lastname;
>   }
>   
>   public String getFirstname() 
>   {
> return firstname;
>   }
>   
>   public void setFirstname(String firstname) 
>   {
> this.firstname = firstname;
>   }
>   
>   public String getEmail() 
>   {
> return email;
>   }
>   
>   public void setEmail(String email) 
>   {
> this.email = email;
>   }
>   
>   public String getId() 
>   {
> return id;
>   }
>   
>   public void setId(String id) 
>   {
> this.id = id;
>   }
> }
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Minimal set of jars for deployment of axis2 client app

2007-10-26 Thread Dennis Urech
Does any know what the minimum distribution of jar files is for a client 
application.  We have already found the xalan.jar and xerces.jar file 
have a conflict with the Preference system in JDK 1.6 and removing them 
from the classpath enabled both my SOAP functionality to work as well as 
Preferences.


begin:vcard
fn:Dennis  Urech
n:Urech;Dennis 
org:Behavioral Recognition Systems, Inc.;Development
adr:;;2100 West Loop South;Houston;TX;77027;USA
email;internet:[EMAIL PROTECTED]
title:Technical Lead
tel;work:713-590-5177
tel;fax:713-590-5161
tel;cell:832-419-2539
x-mozilla-html:TRUE
url:http://www.brslabs.com
version:2.1
end:vcard


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

SV: SV: [Axis2] Custom object not returned correctly from webservice

2007-10-26 Thread Peter A. Kirk
-Oprindelig meddelelse-
Fra: Deepal jayasinghe [mailto:[EMAIL PROTECTED] 
Sendt: 26. oktober 2007 17:34
Til: axis-user@ws.apache.org
Emne: Re: SV: [Axis2] Custom object not returned correctly from
webservice

>Peter A. Kirk wrote:
>> I can return Strings and even String[] no problem, but not my custom
>> type which after all only contains strings?
>>
>> Is it at all possible to return custom types from a java/axis2
>> webservice? I have found numerous other questions on the web
regarding
>   
>Yes you can.

Well, thanks. Nice to at least have that confirmed so I'm not completely
barking up the wrong tree trying to get this to work.

Are there any special "annotations" or anything else required to enable
this? I really can't see why a simple object holding a few strings isn't
very simple to return from a webservice.

Could there be a problem with the wsdl describing this object? Seems
strange though that the c# client "knows" about the class, but the
internal values are sent.


/Peter

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Axis stub response to JSP.

2007-10-26 Thread Ajay Joshi
Thanks for this info..

My stub do not publish the objects like getEmployees() since I am using
Axis Messaging Elements.

I am not sure if I need to use stub.getPullParser(QName) and read the
XML output.

 



From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 25, 2007 5:09 PM
To: axis-user@ws.apache.org
Subject: RE: Axis stub response to JSP.

 

I guess, you can directly invoke your webservice from JSP using the stub
(I haven't tried it though).

 

For Ex:

 

<%

String endPointURL =
http://localhost/webservices/services/MyService;

MyServiceStub stub = new MyServiceStub(endPointURL);



Employee[] employees = stub.getEmployees();  // getEmployees
is a method in your service



// Use this employees array to display the data in the jsp.

%>

 



From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 26, 2000 1:33 PM
To: axis-user@ws.apache.org
Subject: Re: Axis stub response to JSP.

 

JSP -> Servlet(packages WSDLToJava StubClient) including encoding SOAP
Request into XML-> AxisServlet

AxisServlet-> XML response back to Servlet -> Servlet parses the XML
/populates beans/sends textResponse back 
->JSP (AJAX Div Tag or create ResultsJsp)


Im sure there is a simpler solution..Anyone else?

M--

- Original Message - 

From: Ajay Joshi   

To: axis-user@ws.apache.org 

Sent: Thursday, October 25, 2007 3:32 PM

Subject: Axis stub response to JSP. 

 

Hi, 

 

How Axis stub (generated thru WSDL2Java) can return response to
JSP?

 

I can see response in XML format..  response can be print to
browser using servlet in text/html format.

.

But I am not sure how to convert response to Java object than be
displayed to JSP.

Regards

Ajay

 

 



RE: [Axis2] Problem with C# client accessing a Web Service

2007-10-26 Thread Raghu Upadhyayula
Hi Sudhir,

 

I figured out the problem but don't really know how to solve
it.



Looks like the wsdl.exe tool I'm using has a bug.  It
creates a two-dimensional string array if the wsdl has nested elements
that contains maxOccurs=unbounded.



In my WSDL I have the elements defined as follows.





























In the service class, this structure is generated as
follows., observe that the records field is created as a string[][]
instead or Record[]



/// 

[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl",
"2.0.50727.42")]

[System.SerializableAttribute()]

[System.Diagnostics.DebuggerStepThroughAttribute()]

[System.ComponentModel.DesignerCategoryAttribute("code")]

 
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:ws.rsys.com")]

public partial class RecordData {



private string[] fieldNamesField;



private string[][] recordsField;



/// 

[System.Xml.Serialization.XmlElementAttribute("fieldNames",
IsNullable=true)]

public string[] fieldNames {

get {

return this.fieldNamesField;

}

set {

this.fieldNamesField = value;

}

}



/// 

[System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)]

[System.Xml.Serialization.XmlArrayItemAttribute("fieldValues",
typeof(string))]

public string[][] records {

get {

return this.recordsField;

}

set {

this.recordsField = value;

}

}

}

 

Thanks

Raghu

 



From: Sudhir Sharma [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 25, 2007 10:06 PM
To: axis-user@ws.apache.org
Subject: RE: [Axis2] Problem with C# client accessing a Web Service

 

Hi Raghu,

 

Can u put your code (java and C#) here so that we can check and compare
them to find out the loop holes. 

 

Thanks & Best Regards,

Sudhir Sharma



From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 26, 2007 4:09 AM
To: axis-user@ws.apache.org
Subject: [Axis2] Problem with C# client accessing a Web Service

 

Hi,

 

I have a webservice developed using Axis2 1.3.  I wrote a
Java client to access this webservice and everything is working fine.



Today I started writing a C# client to access the same
webservice.



I've used the wsdl.exe tool that comes with Microsoft Visual
Studio to generate the client code and wrote my own class to access
methods in the web service.



Now when I try to run the C# client, I'm getting the below
exception.

 

   at System.Xml.Serialization.Compiler.Compile(Assembly parent, String
ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)

   at
System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[]
xmlMappings, Type[] types, String defaultNamespace, Evidence evidence,
XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable
assemblies)

   at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[]
xmlMappings, Type[] types, String defaultNamespace, String location,
Evidence evidence)

   at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[]
mappings, Type type)

   at System.Web.Services.Protocols.SoapClientType..ctor(Type type)

   at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()

   at WSCSharpClient.ResponsysWSService..ctor()

   at WSCSharpClient.TestResponsysWS.login()

   at WSCSharpClient.TestResponsysWS.run()

Unable to generate a temporary class (result=1).

error CS0030: Cannot convert type 'string[]' to 'string'

error CS0029: Cannot implicitly convert type 'string' to 'string[]'

 

Does anyone have an idea what the problem is or am I missing
anything else?

 

Thanks in Advance.

Raghu



Need help coding web service client with axis, please!!

2007-10-26 Thread Paulo Cristo
Hi,

My name is Paulo, and i'm from Portugal.
I need to make a client to a web service, but i'm still fresh with SOAP/WSDL
and Axis.
I would appreciate any hel on this.

I'm trying to access the services under
http://meteo.estg.ipleiria.pt/webservice/service1.asmx

The following is a sample SOAP 1.2 request and response example available on
that page

REQUEST

POST /webservice/service1.asmx HTTP/1.1
Host: meteo.estg.ipleiria.pt
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length


http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope";>
  
http://tempuri.org/"; />
  


RESPONSE

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length


http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope";>
  
http://tempuri.org/";>
  
float

  


---

And here The following is a sample SOAP 1.1 request and response on
the same page

REQUEST

POST /webservice/service1.asmx HTTP/1.1
Host: meteo.estg.ipleiria.pt
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/ValoresActuais_GetTemperatura";


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



RESPONSE

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length


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

  



And here's the code i'm using to request that service

public String consume() {
try {
   String endpoint = "
http://meteo.estg.ipleiria.pt/webservice/service1.asmx";;

   Service  service = new Service();
   Call call = (Call) service.createCall();

   call.setTargetEndpointAddress( new java.net.URL(endpoint) );
   call.setOperationName(new QName("http://tempuri.org/";,
"ValoresActuais_GetTemperatura"));


   System.out.print(call.getOperationName());
   System.out.print(call.getSOAPActionURI());

  String ret = (String) call.invoke(new Object[] { "" }  );

   System.out.print(ret);

  } catch (Exception e) {
System.err.println(e.toString());
return e.toString();
  }

}

And i'm always getting the following error:

Server did not recognize the value of HTTP Header SOAPAction: .

So, what i 'm i doing wrong?
Can someone help me on this, please?

Thanks

Paulo


Axis2 1.2:Caching Last operation

2007-10-26 Thread Bhojraj, Santosh
Hi:
   I see that in the ServiceContext class, there is a method to cache
the last operation executed by making a call to
'setCachingOperationContext'. This is in turn being used by
OperationClient before making a call to 'setLastOperationContext'. But I
don't see any reference to 'getLastOperationContext()' anywhere else. 
  Has this been implemented in the latest 1.3 version or am I
missing something ? 
 
Thanx!!
Santosh
 
 


Axis 1.4 and gSoap interoperability problems

2007-10-26 Thread Dave Levitt
I'm trying to get an Axis 1.4 client to communicate with a service
implemented using gSoap. The published WSDL has an 'echo' service for
debugging communication issues, but the error is a complaint that the
'input' service does not exist.

I'm trying to invoke the 'echo' service, but the word 'echo' is not in
the soap envelope.

The client code is the JUnit code emitted by wsdl2java.
The code invoking the SOAP call is simply:
String response= binding.echo("bar");
assertEquals("echo test","bar",response);


>From tcpmonitor,

Client side [note that the word 'echo' is _not_ in the SOAP envelope,
and yes its the Axis Java 1.4 libraries, not the 1.3 as listed as the
User-Agent]

POST / HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.3
Host: development.iscompanies.com:80
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: ""
Content-Length: 311
Authorization: Basic ZHJnbmEwMDAwMjptYTE1Y2YxNXRnMTM=

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

Server Side
HTTP/1.1 500 Internal Server Error
Server: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 587
Connection: close

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:ns="urn:is-process">http://schemas.xmlsoap.org/soap/encoding/";>SOAP-ENV:ClientMethod
'input' not implemented: method name or namespace not
recognized

And the WSDL for folks reading this far:

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:ns="urn:xtech-process"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/";
xmlns:DIME="http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/";
xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/";
xmlns="http://schemas.xmlsoap.org/wsdl/";>



 http://schemas.xmlsoap.org/soap/envelope/";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:ns="urn:xtech-process" xmlns="http://www.w3.org/2001/XMLSchema";
elementFormDefault="unqualified" attributeFormDefault="unqualified">
  http://schemas.xmlsoap.org/soap/encoding/"/>
  
  
   

 

   
  
  
  
   

 

   
  
  
  
   

 

   
  
  
  
   

 

   
  
 




 



 



 



 



 
  Service definition of function ns__process
  
  
 
 
  Service definition of function ns__echo
  
  
 



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



 gSOAP 2.7.0c generated service definition
 
  http://localhost:80"/>
 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axis2 1.2:Caching Last operation

2007-10-26 Thread Deepal jayasinghe
Bhojraj, Santosh wrote:
> Hi:
>I see that in the ServiceContext class, there is a method to cache
> the last operation executed by making a call to
> 'setCachingOperationContext'. This is in turn being used by
> OperationClient before making a call to 'setLastOperationContext'. But
> I don't see any reference to 'getLastOperationContext()' anywhere else.
>   Has this been implemented in the latest 1.3 version or am I
> missing something ?
>  
> Thanx!!
> Santosh
>  
>  
from serviceClient you can get the last operation context as below

getLastOperationContext();

Thanks
Deepal


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Name for return parameter

2007-10-26 Thread Alessandro Sivieri
I'm using axis2 1.3 for delivering  web services: I've created a class (with
the methods to be exposed) and a service descriptor, and then I've created
the .aar archive and I've published it on the framework; it works perfectly
with the majority of client libraries for many languages, but a couple of
tools (such as an older version of Mono and the actual version on Adobe
Flex2) gives me some problems, and that's because the return parameter has
the word "return" as the name in the autogenerated wsdl file.
Of course, "return" is a private word in almost every language, and the
compilers of those languages complain... so the question is: is there the
possibility to change the autogenerated name, without changing dramatically
the way of developing my services? Or do I need to abandon the way of
creating the class and the xml descriptor and using some other methods of
development?


Re: Minimal set of jars for deployment of axis2 client app

2007-10-26 Thread Thilina Gunarathne
Following is a recent discussion happend in the Axis2 Dev list..
http://www.nabble.com/-Axis2--Understanding-Axis2-dependencies-t4622338.html

~Thilina

On 10/26/07, Dennis Urech <[EMAIL PROTECTED]> wrote:
> Does any know what the minimum distribution of jar files is for a client
> application.  We have already found the xalan.jar and xerces.jar file
> have a conflict with the Preference system in JDK 1.6 and removing them
> from the classpath enabled both my SOAP functionality to work as well as
> Preferences.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thilina Gunarathne  - http://thilinag.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Axis 1.4 and gSoap interoperability problems

2007-10-26 Thread Cort, Tom
Hi,

I experienced a similar problem. The code generators for gsoap and axis
generated incompatible implementations, even when I gave each of them
the exact same WSDL file. During my debugging I did some packet
sniffing. It appeared that they could not agree on where the xmlns
attribute should go. I ended up trying csoap (
http://csoap.sourceforge.net/ ). It worked with axis, but I strongly
warn against using it. I've discovered nearly 30 buffer overflows and at
least 1 memory leak in csoap. The project hasn't had much activity
lately and the csoap author didn't respond to the patch I sent him. I've
since created a new project cshampoo ( http://cshampoo.sourceforge.net )
to clean up csoap. I should be releasing the first beta in the next week
or two.

-Tom


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Axis 1.4 and gSoap interoperability problems

2007-10-26 Thread Dave Levitt
Since the libraries at each end are fixed, I was wondering about
modifying the wsdl2java generated code in the 'ServiceStub' class [the
createCall() method and / or the settings and parameters before the
call.invoke() method is performed.

I would not like to change the library on the client side, as it is
working fine for RPC style calls to several other services [including
a .NET service].

On 10/26/07, Cort, Tom <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I experienced a similar problem. The code generators for gsoap and axis
> generated incompatible implementations, even when I gave each of them
> the exact same WSDL file. During my debugging I did some packet
> sniffing. It appeared that they could not agree on where the xmlns
> attribute should go. I ended up trying csoap (
> http://csoap.sourceforge.net/ ). It worked with axis, but I strongly
> warn against using it. I've discovered nearly 30 buffer overflows and at
> least 1 memory leak in csoap. The project hasn't had much activity
> lately and the csoap author didn't respond to the patch I sent him. I've
> since created a new project cshampoo ( http://cshampoo.sourceforge.net )
> to clean up csoap. I should be releasing the first beta in the next week
> or two.
>
> -Tom
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: axis2 1.3 wsa:To header usage

2007-10-26 Thread Brian De Pradine
Hello Erwin,

The thing about intermediaries is that they are usually there to hide the 
address of the of the ultimate receiver ( imagine a gateway server or 
proxy for instance ). In that case flowing the address of the ultimate 
receiver across the intermediary would tend to make having the 
intermediary a bit pointless.

Anyone else care to chime in?

Cheers

Brian DePradine
Web Services Development
IBM Hursley
External  +44 (0) 1962 816319 Internal 246319

If you can't find the time to do it right the first time, where will you 
find the time to do it again?


"Erwin Reinhoud" <[EMAIL PROTECTED]> wrote on 25/10/2007 15:54:10:

> Hello all,
> 
> Don't know if this is the correct location to post this, so please 
> let me know if not.
> 
> I create a client and want to make a call with WS-Addressing 
> headers. What i noticed is that often there is a strong relation 
> between the wsa:To value and the actual http uri being used to send 
> the message to the next hop. I thought the wsa:To could contain the 
> (logical) value of the end destination. So if there are two 
> intermediairies than the wsa:To can stay the same over all hops. 
> Currently this does not seem to be. Is my perception of the wsa:To 
wrong?
> 
> ServiceClient client = new ServiceClient(context,null);
> Options ops = new Options();
> Endpointreference to = new Endpointreference("finalDest");
> ops.setTo(to);
> Endpointreference epr = new Endpointreference("http:
> //localhost/axis2/services/myservice");
> client.setoptions(ops);
> client.setTargetEpr(epr);
> 
> The ops.setTo value will be used to dispatch the message.
> 
> 
> Kind regards,
> Erwin
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 






Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU







RE: Problems with Schemas and WSDL in Axis2 (Fixed)

2007-10-26 Thread Matthew Fadoul
Hello all,

 

Thank you for the help.  A couple comments on the solution:

 

1) Although the wsdl2java converter placed my schema in the resources
directory, the Axis2 Service Archiver did not add the schema into the
archive web service file (*.aar).  I resorted to manually copying the schema
into the AAR file (the AAR file is just a ZIP file) each time I ran the
archiver wizard.

2) I played around with the various schemaLocation and namespace attributes
in my WSDL, but I don't know if this caused any problems in the end.
Despite its appearance, the simple namespace "HW" is a valid URI; it's just
a relative one, not absolute.

 

Regards,

 

Matt

 

  _  

From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 19, 2007 4:57 AM
To: axis-user@ws.apache.org
Subject: Re: Problems with Schemas and WSDL in Axis2

 

Can you have a look at with a nighly build.

when generating the code with wsdl2java there is a folder created named as
resources.

under this folder you should have your wsdl and xsd file.

wsdl file should referto the xsd file there. 

i.e it should have and entry like 



Amila.

On 10/19/07, Matthew Fadoul <[EMAIL PROTECTED]> wrote:

Hello all,

 

I'm having trouble using my own schemas in WSDL.  Part of it may be related
to the Axis2 code generation.

 

So, I've made my own "HelloWorld" example.  Here's my process:

 

1) Make WSDL file (attached)

2) Process with Axis2 code generation to build client/server code.  Fill in
a little of the skeleton code.

3) Build inside Eclipse using Ant

4) Package with the Axis2 Service Archiver.

 

I've attached my WSDL and Schema.  The schema has little more than a type
definition based on "xs:string".

 

I've placed my XSD file on a local server.  This is reflected in the
attached WSDL here:

 

< xs:import namespace=" HW" schemaLocation="
http://strawberry/schema/HelloWorldSimple.xsd
 " />

 

By the time the service gets placed on the Axis server, the reference to the
schema in "HelloWorldExternalSchemaService?wsdl" becomes:

 

< xs:import namespace=" HW"
schemaLocation="HelloWorldExternalSchemaService?xsd=
http://strawberry/schema/HelloWorldSimple.xsd"; /> 

 

Unfortunately, Axis can't seem to resolve my schema with the "xsd" option.
Because of this, the schema and all of its types are unresolved.

 

As a side note, I've also toyed with locale schema (i.e. the XSD file is in
the same directory as the WSDL file), though I haven't had much success with
that route either.

 

Questions.  Are there:

Any ideas or advice for integrating schemas with WSDL?  

Any ideas why the code generator is changing the schema location? 

Any glaring mistakes (e.g. namespace problems or DOC/RPC stuff) in my
WSDL/XSD?

 

 

Thank you!

 

Matt


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED]






-- 
Amila Suriarachchi,
WSO2 Inc.