Server did not recognize the value of HTTP Header SOAPAction

2006-05-17 Thread tom mccarthy
I am trying to write a client for this wsdl: 
http://jmhotlinewsstg.jmfamily.com/JMHotlinews.asmx?WSDL


However, when I write a simple axis client that goes something like this:
String method = "SMSCheckIn";
Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(method);
call.addParameter("SourceAddr", XMLType.XSD_STRING, 
ParameterMode.IN);
call.addParameter("DestinationAddr", XMLType.XSD_STRING, 
ParameterMode.IN);
call.addParameter("CarrierName", XMLType.XSD_STRING, 
ParameterMode.IN);
call.addParameter("CarrierID", XMLType.XSD_STRING, 
ParameterMode.IN);
call.addParameter("IsNumberPorted", XMLType.XSD_STRING, 
ParameterMode.IN);
call.addParameter("LocationRegistered", XMLType.XSD_STRING, 
ParameterMode.IN);
call.addParameter("MessageText", XMLType.XSD_STRING, 
ParameterMode.IN);
call.addParameter("DeliveryStatusDescription", 
XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("DeliveryStatusCode", XMLType.XSD_STRING, 
ParameterMode.IN);

call.setReturnType(XMLType.XSD_STRING);

Object parameters[] = new Object[] {null, null, null, null, 
null, null, message, null, null};


return (String)call.invoke(parameters);

I get a long error along the lines of:
Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
 faultSubcode:
 faultString: Server did not recognize the value of HTTP Header 
SOAPAction: .


I am not sure what this means or how to correct it. Or, indeed, if it is 
correctable. I have tried running WSDL2Java in order to help generate a 
client with little success. In that instance I was told that The prefix 
"wsdl" for element "wsdl:definitions" is not bound.


I am assuming that the web service works correctly. However, I am having 
issues creating a java client for it. If anybody has any input 
concerning these problems I'd love to hear it.


Re: maven2 packaging, archetype, etc for axis2?

2006-05-17 Thread B R

Wow that should help a lot. I will try this out and keep the list posted.

Thanks much,
Bhaskar

On 5/17/06, Davanum Srinivas <[EMAIL PROTECTED]> wrote:

Here's a maven2 example: "Embedding an Axis2 based Web Service in your
Webapp" [1]

thanks,
dims

[1] 
http://www.wso2.net/2006/05/embedding_an_axis2_based_web_service_in_your_webapp

On 5/16/06, B R <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> does anybody know of any maven2 support for developing web services using
> Axis2?
>
> Thanks,
> Bhaskar


--
Davanum Srinivas : http://wso2.com/blogs/



Re: soap:header element shows up in soap Header _and_ Body

2006-05-17 Thread Matt Magoffin
Thanks for your reply, Anne, however it does not seem to make any
difference. I have attached my updated WSDL, from which I regenerated the
Axis classes and re-deployed the service, but I'm getting the exact same
SOAP message as before.

I wondered if perhaps the soap:header message should be capitalized to
tns:ProcessMessageIn, but that did not help, either.

Any other thoughts?

> Matt,
>
> A few mistakes in your WSDL:
>
> You must specify the  definition before the 
> definition. Because you have defined two parts in the message, the
>  must include the "parts" attribute and specify the specific
> part
> that goes in the body. Your  must refer to the message
> (tns:processMessageIn) that contains the header part definition. E.g.,
>
>
> use="literal"/>
>  message="tns:processMessageIn"
>part="requestHeader"
> use="literal"/>
>
>
> Anne
> On 5/17/06, Matt Magoffin <[EMAIL PROTECTED]> wrote:
>>
>> Hello, I am trying to work with a WSDL that requires a header element,
>> and
>> am having trouble getting Axis 1.4 to correctly generate the SOAP
>> message.
>> I've generated Axis classes from the WSDL. The best I've been able to do
>> is get the header element to show up correctly in the SOAP header, but
>> then it also shows up as the body element, with the expected body
>> element
>> as a child, like this (XML truncated as to simplify):
>>
>> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; ...
>>   
>> > xmlns:ns1="http://www.starstandards.org/webservices/...
>>   > namespaceURI="...
>> 
>>   
>>   
>> > xmlns="http://www.starstandards.org/webservices/2003/12/transport";>
>>   
>> 
>>   
>> 
>>
>> Here the  element is as expected in the
>>  but the expected element in  is the
>>  element, not another  element.
>>
>> The relevant WSDL I have is arranged as such:
>>
>> 
>> > element="starws:ProcessMessage"/>
>> > element="starws:payloadManifest"/>
>> 
>>
>> 
>> > element="starws:ProcessMessageResponse"/>
>> > element="starws:payloadManifest"/>
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> http://schemas.xmlsoap.org/soap/http";
>> style="document"/>
>> 
>> > soapAction="
>> http://www.starstandards.org/.../ProcessMessage";
>> style="document"/>
>> 
>> > message="tns:ManifestHeader"
>> part="requestHeader"
>> use="literal"/>
>> 
>> 
>> 
>> > message="tns:ManifestHeader"
>> part="responseHeader"
>> use="literal"/>
>> 
>> 
>> 
>> 
>>
>> Anything look fishy here? I'm at a loss at this point... I've attached
>> the
>> full WSDL for reference.
>>
>> -- m@
>>
>>
>>
>


StarTransport.wsdl
Description: Binary data


Re: Username Token in Outgoing Request from Client programmatically

2006-05-17 Thread Anne Thomas Manes
Have you tried using WSS4J?On 5/17/06, Raghbir Singh <[EMAIL PROTECTED]> wrote:
Can anybody give me an overview how can I add Username Token to anoutgoing message to only one particular Outgoing Request from a Client.I generated the code using WSDL2Java and everything works fine. I just
need to add Security to a few requests programmatically.Thanks a lot,Raghbir Singh


Re: soap:header element shows up in soap Header _and_ Body

2006-05-17 Thread Anne Thomas Manes
Matt,A few mistakes in your WSDL:You must specify the  definition before the  definition. Because you have defined two parts in the message, the  must include the "parts" attribute and specify the specific part that goes in the body. Your  must refer to the message (tns:processMessageIn) that contains the header part definition. 
E.g.,                                                                                                                                part="requestHeader" use="literal"/>                       AnneOn 5/17/06, 
Matt Magoffin <[EMAIL PROTECTED]> wrote:
Hello, I am trying to work with a WSDL that requires a header element, andam having trouble getting Axis 1.4 to correctly generate the SOAP message.I've generated Axis classes from the WSDL. The best I've been able to do
is get the header element to show up correctly in the SOAP header, butthen it also shows up as the body element, with the expected body elementas a child, like this (XML truncated as to simplify):xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ...  xmlns:ns1="
http://www.starstandards.org/webservices/...  http://www.starstandards.org/webservices/2003/12/transport">  
  Here the  element is as expected in the but the expected element in  is the
 element, not another  element.The relevant WSDL I have is arranged as such:
element="starws:ProcessMessageResponse"/>

http://schemas.xmlsoap.org/soap/http"style="document"/>
soapAction="http://www.starstandards.org/.../ProcessMessage"style="document"/>
part="requestHeader" use="literal"/>
part="responseHeader" use="literal"/>
Anything look fishy here? I'm at a loss at this point... I've attached thefull WSDL for reference.-- m@


Re: soap:header element shows up in soap Header _and_ Body

2006-05-17 Thread Anne Thomas Manes
Matt,A few mistakes in your WSDL:You must specify the  definition before the  definition. Because you have defined two parts in the message, the  must include the "parts" attribute and specify the specific part that goes in the body. Your  must refer to the message (tns:processMessageIn) that contains the header part definition. 
E.g.,                                                                                                                                part="requestHeader" use="literal"/>                       AnneOn 5/17/06, 
Matt Magoffin <[EMAIL PROTECTED]> wrote:
Hello, I am trying to work with a WSDL that requires a header element, andam having trouble getting Axis 1.4 to correctly generate the SOAP message.I've generated Axis classes from the WSDL. The best I've been able to do
is get the header element to show up correctly in the SOAP header, butthen it also shows up as the body element, with the expected body elementas a child, like this (XML truncated as to simplify):xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ...  xmlns:ns1="
http://www.starstandards.org/webservices/...  http://www.starstandards.org/webservices/2003/12/transport">  
  Here the  element is as expected in the but the expected element in  is the
 element, not another  element.The relevant WSDL I have is arranged as such:
element="starws:ProcessMessageResponse"/>

http://schemas.xmlsoap.org/soap/http"style="document"/>
soapAction="http://www.starstandards.org/.../ProcessMessage"style="document"/>
part="requestHeader" use="literal"/>
part="responseHeader" use="literal"/>
Anything look fishy here? I'm at a loss at this point... I've attached thefull WSDL for reference.-- m@


soap:header element shows up in soap Header _and_ Body

2006-05-17 Thread Matt Magoffin
Hello, I am trying to work with a WSDL that requires a header element, and
am having trouble getting Axis 1.4 to correctly generate the SOAP message.
I've generated Axis classes from the WSDL. The best I've been able to do
is get the header element to show up correctly in the SOAP header, but
then it also shows up as the body element, with the expected body element
as a child, like this (XML truncated as to simplify):

http://schemas.xmlsoap.org/soap/envelope/"; ...
  
http://www.starstandards.org/webservices/...
  http://www.starstandards.org/webservices/2003/12/transport";>
  

  


Here the  element is as expected in the
 but the expected element in  is the
 element, not another  element.

The relevant WSDL I have is arranged as such:



















http://schemas.xmlsoap.org/soap/http";
style="document"/>

http://www.starstandards.org/.../ProcessMessage";
style="document"/>











Anything look fishy here? I'm at a loss at this point... I've attached the
full WSDL for reference.

-- m@


StarTransport.wsdl
Description: Binary data


[Axis2] please help WSDL2JAVA...

2006-05-17 Thread Jenny ZHANG
Dear all, 

I tried to WSDL2JAVA the "Axis2SampleDocLit.wsdl " used as an exmpale in users' 
guide, but 
got the following warning information at the end,  and I was also not sure if 
the 
"Axis2SampleDocLitPortTypeSkeleton.java" was generated, as I could find it 
although all other
files were generated. 

"
C:\Apache\Axis2-std-1.0\bin>wsdl2java -uri ..\samples\wsdl\Axis2SampleDocLit.wsd
l -ss -sd -d xmlbeans -o ..\samples -p org.apache.axis2.userguide
Using AXIS2_HOME:   C:\Apache\Axis2-std-1.0
Using JAVA_HOME:g:\jdk1.5.0_06
log4j:WARN No appenders could be found for logger (org.apache.axis2.wsdl.codegen
.emitter.AxisServiceBasedMultiLanguageEmitter).
log4j:WARN Please initialize the log4j system properly.
"
   
I put the following .jar into my class path,  I wondering if I miss any .jar? 
   axis-*.jar;
   axis-wsdl4j-1.5.2.jar;
   stax-api-1.0.jar;
   log4j-1.2.13.jar 
commons-logging-api.jar 

Thanks in advnace ! 

 
Jenny Zhang
[EMAIL PROTECTED]
2006-05-18



WSS4j from dynamic webservice client

2006-05-17 Thread Ravi Krishnamurthy




Hello:
I have a dynamic webservice client using axisv 1.2. Trying to set the
wss4j related security headers as mentioned in
http://ws.apache.org/wss4j/axis.html. but I get the following error:

AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode: 
 faultString: WSDoAllReceiver: Request does not contain required
Security header
 faultActor: 
 faultNode: 
 faultDetail: 
    {http://xml.apache.org/axis/}hostname:chennai

WSDoAllReceiver: Request does not contain required Security header..


But on adding the Daxis.ClientConfigFile=client_deploy.wsdd
it works fine.

Could someone help me what I may be doing wrong.

I ahve attached both my axis client as well the password callback class.

Thanks,
Ravi





import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.tempuri.*;


import org.apache.ws.security.handler.WSHandlerConstants;
import org.apache.ws.security.message.token.UsernameToken;
import org.apache.ws.security.WSConstants;
import samples.stock.client.PWCallback;


public class SimpleServiceClient {

private static String endpoint ="http://10.1.5.229:8415/axis/services/stock-wss-01";;
public static void main(String[] args) throws Exception{
call1();
}

public static void call1(){
try{
Service  service = new Service();
Call _call= (Call)(service.createCall());

_call.setProperty(UsernameToken.PASSWORD_TYPE, WSConstants.PASSWORD_DIGEST);
_call.setProperty(WSHandlerConstants.USER, "wss4j");
_call.setProperty(WSHandlerConstants.PW_CALLBACK_REF, new PWCallback());


_call.setSOAPActionURI("");
_call.setOperationStyle(org.apache.axis.constants.Style.DOCUMENT);
_call.setTargetEndpointAddress( new java.net.URL(endpoint) );


_call.setOperationName(new QName("http://10.1.5.229:8415/axis/services/stock-wss-01","getQuote";));
_call.addParameter(new javax.xml.namespace.QName("http://stock.samples";, "symbol"),new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema";, "string"),ParameterMode.IN);

_call.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema";, "float"));
_call.setReturnClass(float.class);
_call.setReturnQName(new javax.xml.namespace.QName("http://10.1.5.229:6415/axis/services/stock-wss-01";, "getQuoteReturn"));


System.out.println(" Response from SimpleServiceClient is  is " + _call.invoke(new Object[] {"IBM"}));


}catch (Exception ex){
ex.printStackTrace();
}
}
}
package samples.stock.client;
import java.io.IOException;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;

import org.apache.ws.security.WSConstants;
import org.apache.ws.security.WSPasswordCallback;
import org.apache.ws.security.handler.WSHandlerConstants;
import org.apache.ws.security.message.token.UsernameToken;

public class PWCallback implements CallbackHandler {

public PWCallback(){
System.out.println(" PWCallback created ");
}

public static void main(String args[]) throws Exception {
/*
StockQuoteServiceService locator = new StockQuoteServiceServiceLocator();
StockQuoteService service = locator.getStockWss01();


((org.apache.axis.client.Stub)service)._setProperty(UsernameToken.PASSWORD_TYPE, WSConstants.PASSWORD_DIGEST);
((org.apache.axis.client.Stub)service)._setProperty(WSHandlerConstants.USER, "wss4j");
((org.apache.axis.client.Stub)service)._setProperty(WSHandlerConstants.PW_CALLBACK_REF, PWCallback.class);
*/
}

public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {


for (int i = 0; i < callbacks.length; i++) {
System.out.println(" execuiting handler : " + callbacks[i]);
if (callbacks[i] instanceof WSPasswordCallback) {
WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
// set the password given a username
System.out.println(" pc.getIdentifier is " + pc.getIdentifer());
if ("wss4j".equals(pc.getIdentifer())) {
pc.setPassword("security");
}
} else {
throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
}
}
}
}


[axis2] dispatch model reference doc

2006-05-17 Thread Jeff Greif

Is there a good reference to the possible dispatching models available
in Axis2, or is reading the source the way to find out?  The api
javadoc is too sparse to learn much.

This is what I'm trying to achieve:

There is a single web service implementation class which implements a
dynamic set of web services.  Each of these services exposes a wsdl,
and each is allowed to have a different endpoint (all within the
URL-space handled by the Axis servlet).  For example,
http://localhost:some-port/MasterService/service-1 and
http://localhost:some-port/MasterService/service-2 would be dispatched
to the class implementing MasterService, which would use the
"service-n" part of the URL and perhaps other content of the request
like SOAP-Action or element-name of the soap body child to look up in
its configuration information how to process further.

An example might be a generic XSLT service that processes one or more
input documents with a transform determined by the service-n part of
the URL (perhaps plus other info like SOAP-Action), and returns one or
more documents in the result.  Each service-n would have a different
wsdl or would be a different operation in one wsdl.  Another example
might be a BPEL engine which exposes composite web services with their
own wsdls, but interprets a BPEL descriptor in order to execute one of
them on the inputs provided.

In Axis1, I would provide a message-style service that accessed the
request, message context and servlet context to determine how to
process the request.  What is the analog, if any, in Axis2?

The following related question applies to both axis1 and axis2.

For the dynamic set of services described above, there would be only
one service Axis knows about, the MasterService described in the
deployment descriptor.  However, the dynamic set of services should be
able to provide their wsdls via requests for urls like
http://localhost:some-port/MasterService/service-n?wsdl.  Is there a
way to plug into the wsdl-location machinery in Axis1 and/or Axis2 to
be able to find these wsdls somewhere in the classpath using the
service-n name or to provide a class that could generate them on the
fly from the configuration information?

Thanks much for any assistance.

Jeff


[axis2] Dispatching model reference

2006-05-17 Thread Jeff Greif
Is there a good reference to the possible dispatching models available 
in Axis2, or is reading the source the way to find out?


This is what I'm trying to achieve:

There is a single web service implementation class which implements a 
dynamic set of web services.  Each of these services exposes itself by a 
wsdl, and each is allowed to have a different endpoint (all within the 
URL-space handled by the Axis servlet).  For example, 
http://localhost:some-port/MasterService/service-1 and 
http://localhost:some-port/MasterService/service-2 would be dispatched 
to the class implementing MasterService, which would use the "service-n" 
part of the URL and perhaps other content of the request like 
SOAP-Action or element-name of the soap body child to look up in its 
configuration information how to process further.


An example might be a generic XSLT service that processes one or more 
input documents with a transform determined by the service-n part of the 
URL (perhaps plus other info like SOAP-Action), and returns one or more 
documents in the result.  Each service-n would have a different wsdl or 
would be a different operation in one wsdl.  Another example might be a 
BPEL engine which exposes composite web services with their own wsdls, 
but interprets a BPEL descriptor in order to execute one of them on the 
inputs provided.


In Axis1, I would provide a message-style service that accessed the 
request, message context and servlet context to determine how to process 
the request.  What is the analog, if any, in Axis2?


Jeff


Username Token in Outgoing Request from Client programmatically

2006-05-17 Thread Raghbir Singh
Can anybody give me an overview how can I add Username Token to an 
outgoing message to only one particular Outgoing Request from a Client.


I generated the code using WSDL2Java and everything works fine. I just 
need to add Security to a few requests programmatically.


Thanks a lot,
Raghbir Singh


Re: Compression proprosal

2006-05-17 Thread Thom Hehl

OK, where does the following code go?

VersionSoapBindingStub binding = (VersionSoapBindingStub) new 
VersionServiceLocator()
   .getVersion();

// Compress the request
binding._setProperty(HTTPConstants.MC_GZIP_REQUEST, Boolean.TRUE);
// Tell the server it can compress the response
binding._setProperty(HTTPConstants.MC_ACCEPT_GZIP, Boolean.TRUE);

// invoke the service
String result = binding.getVersion();

I use WSDL2JAVA to generate my classes. Am I going to have to hand edit 
one of these classes I don't normally change? Can I plug something into 
wsdl2java to do that for me?


Thanks.

Davanum Srinivas wrote:

already done :)

http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression

-- dims

On 5/17/06, Thom Hehl <[EMAIL PROTECTED]> wrote:

We're using Axis-java 1.3. I have a project to compress the SOAP
payload. I was thinking it would be better to compress the entire SOAP
envelope. How would I do this?

At some point, invoke is probably using java.net and sending data in and
out through some kind of input stream. I would like to have axis look at
startup for certain classes that I feed it as subclasses of
FilterInputStream and FilterOutputStream. They would wrap these around
the InputStream and OutputStream currently communicating with the
sockets. THis would allow fast cheap and easy implementation of
compression of the entire SOAP envelope, speeding along the process with
VERY low impact to the axis code base itself.

These streams would be specified in the configuration file or using
system properties and would be bound at run time using reflection.

I would be interested in hearing any opinions about this.






Re: Compression proprosal

2006-05-17 Thread Thom Hehl

Wow! What a great idea!

Davanum Srinivas wrote:

already done :)

http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression

-- dims

On 5/17/06, Thom Hehl <[EMAIL PROTECTED]> wrote:

We're using Axis-java 1.3. I have a project to compress the SOAP
payload. I was thinking it would be better to compress the entire SOAP
envelope. How would I do this?

At some point, invoke is probably using java.net and sending data in and
out through some kind of input stream. I would like to have axis look at
startup for certain classes that I feed it as subclasses of
FilterInputStream and FilterOutputStream. They would wrap these around
the InputStream and OutputStream currently communicating with the
sockets. THis would allow fast cheap and easy implementation of
compression of the entire SOAP envelope, speeding along the process with
VERY low impact to the axis code base itself.

These streams would be specified in the configuration file or using
system properties and would be bound at run time using reflection.

I would be interested in hearing any opinions about this.






Re: Compression proprosal

2006-05-17 Thread Davanum Srinivas

already done :)

http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression

-- dims

On 5/17/06, Thom Hehl <[EMAIL PROTECTED]> wrote:

We're using Axis-java 1.3. I have a project to compress the SOAP
payload. I was thinking it would be better to compress the entire SOAP
envelope. How would I do this?

At some point, invoke is probably using java.net and sending data in and
out through some kind of input stream. I would like to have axis look at
startup for certain classes that I feed it as subclasses of
FilterInputStream and FilterOutputStream. They would wrap these around
the InputStream and OutputStream currently communicating with the
sockets. THis would allow fast cheap and easy implementation of
compression of the entire SOAP envelope, speeding along the process with
VERY low impact to the axis code base itself.

These streams would be specified in the configuration file or using
system properties and would be bound at run time using reflection.

I would be interested in hearing any opinions about this.




--
Davanum Srinivas : http://wso2.com/blogs/


Compression proprosal

2006-05-17 Thread Thom Hehl
We're using Axis-java 1.3. I have a project to compress the SOAP 
payload. I was thinking it would be better to compress the entire SOAP 
envelope. How would I do this?


At some point, invoke is probably using java.net and sending data in and 
out through some kind of input stream. I would like to have axis look at 
startup for certain classes that I feed it as subclasses of 
FilterInputStream and FilterOutputStream. They would wrap these around 
the InputStream and OutputStream currently communicating with the 
sockets. THis would allow fast cheap and easy implementation of 
compression of the entire SOAP envelope, speeding along the process with 
VERY low impact to the axis code base itself.


These streams would be specified in the configuration file or using 
system properties and would be bound at run time using reflection.


I would be interested in hearing any opinions about this.


RE: [Axis2 1.0] Missing namespace on subelement

2006-05-17 Thread Dave MacLean
Hi Deepal,

[jira] Created: (AXIS2-747) Missing namespace on subelement

Missing namespace on subelement


 Key: AXIS2-747
 URL: http://issues.apache.org/jira/browse/AXIS2-747
 Project: Apache Axis 2.0 (Axis2)
Type: Bug

  Components: om  
Versions: 1.0
 Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with
tomcat plugin
Reporter: Qi An
Priority: Critical


Thanks for your help!

-Dave

-Original Message-
From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 15, 2006 10:13 AM
To: axis-user@ws.apache.org
Subject: Re: [Axis2 1.0] Missing namespace on subelement

pls create a JIRA

Dave MacLean wrote:

>Hello everyone,
>We're running into a bit of trouble since we moved from axis2 0.95 to
>1.0.
>
>The below all worked fine on 0.95:
>
>The complex type in question is defined in the wsdl as:
>
>
>
>   
>
>
>
>
>   
>   
>   use="required"/>
>   use="optional"/>
>   use="optional"/>
>   use="optional"/>
>   use="optional"/>
>   use="optional"/>
>   
>
>
>
>
>In the provider's skeleton, we have the following:
>
>public com.businessobjects.dsws.session.LoginResponseDocument
login(
>com.businessobjects.dsws.session.LoginDocument param12)
>throws
>com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException
,
>RemoteException {
>   Login obj = param12.getLogin();
>   Credential cred = obj.getCredential();
>
>
>The problem is, on the getCredential() call, we actually get back an
>object of type Credential (base class) when the method was invoked with
>an enterprise credential.  So that further on, on the line:
>
>EnterpriseCredential enterpriseCredential = (EnterpriseCredential)
cred;
>
>We get a class cast exception.
>
>Tracing through a bit with the SOAPMonitor, we noticed that the xml
>envelope actually ends up looking like:
>
>
>xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>
>
>
>http://www.w3.org/2001/XMLSchema-instance";
>Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>Login="administrator" />
>
>
>
>
>Where the namespace definition of "ses" is clearly missing.  If you
>trace through the deserialization code a bit, this is why the object
>comes back as the base class instead of the extended type.
>
>Once thing interesting one of our developer's noticed, is that if, on
>the consumer side, you add the lines:
>
>XmlOptions op1 = new XmlOptions();
>op1.setSaveNamespacesFirst();
>m_credential =
>EnterpriseCredential.Factory.newInstance(op1);
>
>At the time you create the credential, it seems that *some of the time*
>this fixes the problem, so that the xml appears as:
>
>
>xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>
>
>
>http://www.w3.org/2001/XMLSchema-instance";
>xmlns:ses="session.dsws.businessobjects.com" Password=""
>Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>Login="administrator" />
>
>
>
>
>But only some of the time.
>
>Is it possible there's a race condition here and that somehow the
>attribute list is getting overwritten, or are we doing something wrong?
>
>Thanks in advance,
>
>Dave
>
>
>  
>

-- 
Thanks,
Deepal

~Future is Open~ 



Re: Omit SOAPAction from Http header

2006-05-17 Thread Anne Thomas Manes
You won't be able to use SOAP 1.2 unless the service supports it.You can tell which version(s) of SOAP the service supports by looking at the namespace for the SOAP WSDL binding extensions, e.g. what's the namespace bound to the "soap" prefix for the  definition. 
The WSDL should fully define the supported bindings for the service, and you should be able to generate a stub from the WSDL, which should generate a valid message for you.But I'm highly suspect of the service if it can't handle a SOAPAction HTTP header.
AnneOn 5/17/06, Roy <[EMAIL PROTECTED]> wrote:
Yes I have noticed that in SOAP v1.1 this is a mandatory field in Http Header. If i generate the code by using the attribute in wsdl2Javathat changes the SOAP version to 1.2 will i have an effect? I saw in the SOAP 1.2
 specification that the SOAPAction field is optional.If this doesn't work how can i change the header before i send the call request?Can you please tell me a way to do this?Thank youRoyAnne Thomas Manes <
[EMAIL PROTECTED]> έγραψε:
 It's not a valid SOAP 1.1 over HTTP message if you omit the SOAPAction header. Axis will not permit you to generate an invalid message. You will have to intercept the message after it leaves Axis and remove the header.
 On 5/17/06, Roy <[EMAIL PROTECTED]>
 wrote: Hello,I am using AXIS to call a web service with a static stub 
client.I have a problem with the HttpHeader generated from AXIS. I want to omit completely the SOAPAction field because the web service i want to call isn't able to understand this field. I have have set the SOAPAction value to "" but i had the same results. How can i remove it completely? 
Thank you. Χρησιμοποιείτε Yahoo!  Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων 
  http://login.yahoo.com/config/mail?.intl=gr 
  
		 
Χρησιμοποιείτε Yahoo! 
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων  
http://login.yahoo.com/config/mail?.intl=gr 



RE: Data binding problem (xmlbeans) - binding subelement to toplevel element?

2006-05-17 Thread Andrew Cohen








Anne,

 

Thank you! That did the trick J

 



-Andrew.

 











From: Anne Thomas
Manes [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 17, 2006 2:50
PM
To: axis-user@ws.apache.org
Subject: Re: Data binding problem
(xmlbeans) - binding subelement to toplevel element?



 

Andrew, 
With RPC style, your message parts must reference types rather than elements

Your WSDL should look something like this:

// TYPES

        
       
maxOccurs="1"/>
               
maxOccurs="1"/>
       



       
               
maxOccurs="1"/>
               
maxOccurs="1"/>
       
 

// MESSAGES

     type="xsd1:testSearchRequest"
name="testSearchRequest"/>






   type="xsd1:testSearchResponse"
name="testSearchResponse"/> 





Anne



On 5/17/06, Andrew
Cohen <[EMAIL PROTECTED]>
wrote:

Apologies in advance if
this is known problem, but I'm hoping the answer to
this is easy...

I can't seem to get passed a data binding problem in my client stub on a
response for a very simple scenario. It appears that the client stub is 
trying to bind a subelement of my response ("testid") to the top
level
element ("testSearchResponse").

The error is:

Exception: Data Binding Error caused by:

Caused by: org.apache.xmlbeans.XmlException : error: The document is not a
testSearchResponseParam@http://net.semandex.searchservice.webservice/xsd:
document element local name mismatch expected testSearchResponseParam got 
testid

Here is the simple WSDL:

// TYPES



maxOccurs="1"/>

maxOccurs="1"/>

 




maxOccurs="1"/> 

maxOccurs="1"/>



// MESSAGES
 
  



 


// PORTTYPE

   
   
  
   


// BINDING

type="tns:SearchPortType">

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

http://net.semandex.search.service/Search"
use="literal"/>
 
 

http://net.semandex.search.service/Search"
use="literal"/>
 
   



Thanks,
Andrew







 








Re: Data binding problem (xmlbeans) - binding subelement to toplevel element?

2006-05-17 Thread Anne Thomas Manes
Andrew, With RPC style, your message parts must reference types rather than elementsYour WSDL should look something like this:// TYPES        
        maxOccurs="1"/>                maxOccurs="1"/>                                maxOccurs="1"/>                maxOccurs="1"/>        
// MESSAGES      type="xsd1:testSearchRequest" name="testSearchRequest"/>
    type="xsd1:testSearchResponse" name="testSearchResponse"/>
AnneOn 5/17/06, Andrew Cohen <[EMAIL PROTECTED]> wrote:
Apologies in advance if this is known problem, but I'm hoping the answer tothis is easy...I can't seem to get passed a data binding problem in my client stub on aresponse for a very simple scenario. It appears that the client stub is
trying to bind a subelement of my response ("testid") to the top levelelement ("testSearchResponse").The error is:Exception: Data Binding Error caused by:Caused by: org.apache.xmlbeans.XmlException
: error: The document is not atestSearchResponseParam@http://net.semandex.searchservice.webservice/xsd:document element local name mismatch expected testSearchResponseParam got
testidHere is the simple WSDL:// TYPESmaxOccurs="1"/>maxOccurs="1"/>
maxOccurs="1"/>
maxOccurs="1"/>// MESSAGES
  
// PORTTYPE     
 // BINDING
type="tns:SearchPortType">transport="http://schemas.xmlsoap.org/soap/http"/>   
   
http://net.semandex.search.service/Search"use="literal"/>  
http://net.semandex.search.service/Search"use="literal"/>    Thanks,Andrew



Re: [axis2] mustunderstand attribute in SOAP-Header

2006-05-17 Thread Eran Chinthaka
Can't you do this with Axiom ?

[EMAIL PROTECTED] wrote:
> Hi,
> 
> I still have the problem that I doesn't know a nice
> solution for attaching 'mustUnderstand' attributes to
> a soap header, using axis2 1.0.
> 
> So, is there someone who has a solution for that?
> 
> Thanks Ted
> 
> 
>   
> 
>   
>   
> ___ 
> Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
> 




signature.asc
Description: OpenPGP digital signature


Re: maven2 packaging, archetype, etc for axis2?

2006-05-17 Thread Davanum Srinivas

Here's a maven2 example: "Embedding an Axis2 based Web Service in your
Webapp" [1]

thanks,
dims

[1] 
http://www.wso2.net/2006/05/embedding_an_axis2_based_web_service_in_your_webapp

On 5/16/06, B R <[EMAIL PROTECTED]> wrote:


Hi,

does anybody know of any maven2 support for developing web services using
Axis2?

Thanks,
Bhaskar



--
Davanum Srinivas : http://wso2.com/blogs/


Re: passing XML document as input parameter

2006-05-17 Thread Suavi Ali Demir
Don't forget you might have xml as:     "X < Y"     Now, if you process this string and make:     "X < Y"     When you reverse it, you will get:     "X < Y"     which is incorrect.      So, you will need more escaping than just "<".     Regards,  AliXinjun Chen <[EMAIL PROTECTED]> wrote:Hi Dies,      Thank you! You are right. In fact I can do that :-). Just need to replace all "<" by "<".  Regards,   Xinjun 
    On 5/17/06, Dies Koper <[EMAIL PROTECTED]> wrote:   Hello Xinjun,Just use a String type field.Axis will replace the '<'s and '>'s in your XML with '<'s resp. '>'s, making it valid XML content.Regards,DiesSuavi Ali Demir wrote:> Why can you not embed xml inside xml?>   Regards,>   Ali>> Xinjun Chen < [EMAIL PROTECTED]> wrote:> As far as I know, I cannot embed XML inside XML, so how can I pass an XML document as an input parameter to a web service?>   Could anyone provide some pointer on that? >>  
 Regards,>   Xinjun

Re: Data binding problem (xmlbeans) - binding subelement to toplevel element?

2006-05-17 Thread robert lazarski
If you post your code and the full wsdl maybe we can help.

Robert
http://www.braziloutsource.com/On 5/17/06, Andrew Cohen <[EMAIL PROTECTED]
> wrote:Apologies in advance if this is known problem, but I'm hoping the answer to
this is easy...I can't seem to get passed a data binding problem in my client stub on aresponse for a very simple scenario. It appears that the client stub istrying to bind a subelement of my response ("testid") to the top level
element ("testSearchResponse").The error is:Exception: Data Binding Error caused by:Caused by: org.apache.xmlbeans.XmlException: error: The document is not atestSearchResponseParam
@http://net.semandex.searchservice.webservice/xsd:document element local name mismatch expected testSearchResponseParam gottestidHere is the simple WSDL:
// TYPESmaxOccurs="1"/>
maxOccurs="1"/>
maxOccurs="1"/>maxOccurs="1"/>// MESSAGES
  
// PORTTYPE     
 // BINDING
type="tns:SearchPortType">transport="http://schemas.xmlsoap.org/soap/http"/>   
   
http://net.semandex.search.service/Search"use="literal"/>  
http://net.semandex.search.service/Search"use="literal"/>    Thanks,Andrew



[Axis2][1.0] overwrite WSDL ?

2006-05-17 Thread Kinichiro Inoguchi
Hi,

Does anyone know is it possible to overwrite WSDL 
of service using RPCMessageReceiver ?

I want to use my WSDL file that I modified "types" and

"namespace" a little bit.
But I also want to use automatic data binding 
functionality of RPCMessageReceiver.

Or if I need to use my own WSDL file,
should I use RawXMLINOutMessageReceiver ?

Thanks,
kinichiro

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


Re: [Axis2] ServiceClient.addStringHeader() problems

2006-05-17 Thread Michele Mazzucco
example1/MyService:

1) no headers added:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=CF2A6A3A366706087FBBD8818E91A62C; Path=/axis2
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_1CAAD3F62EB8F21F2011478815557861;
type="application/xop+xml";
start="<0.urn:uuid:[EMAIL PROTECTED]>";
start-info="text/xml";charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 17 May 2006 15:59:15 GMT

23e
--MIMEBoundaryurn_uuid_1CAAD3F62EB8F21F2011478815557861
content-type:application/xop+xml; charset=UTF-8; type="text/xml";
content-transfer-encoding:binary
content-id:<0.urn:uuid:[EMAIL PROTECTED]>

http://schemas.xmlsoap.org/soap/envelope/";>http://example1.org/example1";
xmlns:tns="http://ws.apache.org/axis2";>Axis2 Echo String

3b

--MIMEBoundaryurn_uuid_1CAAD3F62EB8F21F2011478815557861--
0



2) sender.addHeader(OMElement), where the OMElement is very similar to
the object returned by ClientUtil.getEchoElement():


HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 2118
Date: Wed, 17 May 2006 16:01:31 GMT
Connection: close

Apache Tomcat/5.5.15 - Error
report
HTTP Status 500 - type Exception reportmessage
description The server encountered an internal
error () that prevented it from fulfilling this
request.exception
org.apache.axiom.om.OMException:
com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character
'>' (code 62) expected '='
 at [row,col {unknown-source}]: [1,226]

org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:207)

org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:263)

org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.next(OMChildrenQNameIterator.java:101)

org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:223)

org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76)

org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:194)

org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is
available in the Apache Tomcat/5.5.15 logs.Apache Tomcat/5.5.15




3) sender.addStringHeader(new QName("qname"), "Header text"):

HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 1857
Date: Wed, 17 May 2006 16:06:42 GMT
Connection: close

Apache Tomcat/5.5.15 - Error
report
HTTP Status 500 - type Exception reportmessage
description The server encountered an internal
error () that prevented it from fulfilling this
request.exception java.lang.NullPointerException

org.apache.axiom.soap.impl.llom.SOAPHeaderImpl.getHeaderBlocksWithNSURI(SOAPHeaderImpl.java:217)

org.apache.axis2.handlers.addressing.AddressingInHandler.invoke(AddressingInHandler.java:64)
org.apache.axis2.engine.Phase.invoke(Phase.java:378)
org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:492)
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:462)

org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:283)
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:137)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is
available in the Apache Tomcat/5.5.15 logs.Apache Tomcat/5.5.15



Michele

Davanum Sr

Re: [Axis2] ServiceClient.addStringHeader() problems

2006-05-17 Thread Michele Mazzucco
I'm sorry, but where can I find the 'axis2-soapmonitor.jar' file
mentioned here: http://ws.apache.org/axis2/1_0/soapmonitor-module.html?

Michele

Davanum Srinivas wrote:
> What do you see on the wire? can u please try tcpmon or some other
> mechanism to look at the actual soap messages?
> 
> thanks.,
> dims
> 
> On 5/17/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> I noticed that the calls ServiceClient.addStringHeader() and
>> ServiceClient.addHeader() cause the message to be not received.
>>
>> Any idea?
>>
>> Michele
>>
> 
> 


Re: Omit SOAPAction from Http header

2006-05-17 Thread Roy
Yes I have noticed that in SOAP v1.1 this is a mandatory field in Http Header. If i generate the code by using the attribute in wsdl2Javathat changes the SOAP version to 1.2 will i have an effect? I saw in the SOAP 1.2 specification that the SOAPAction field is optional.If this doesn't work how can i change the header before i send the call request?Can you please tell me a way to do this?Thank youRoyAnne Thomas Manes <[EMAIL PROTECTED]> έγραψε: It's not a valid SOAP 1.1 over HTTP message if you omit the SOAPAction header. Axis will not permit you to generate an invalid message. You will have to intercept the message after it leaves Axis and remove the header. On 5/17/06, Roy <[EMAIL PROTECTED]>
 wrote: Hello,I am using AXIS to call a web service with a static stub client.I have a problem with the HttpHeader generated from AXIS. I want to omit completely the SOAPAction field because the web service i want to call isn't able to understand this field. I have have set the SOAPAction value to "" but i had the same results. How can i remove it completely? Thank you. Χρησιμοποιείτε Yahoo!  Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων   http://login.yahoo.com/config/mail?.intl=gr 
  
		 
Χρησιμοποιείτε Yahoo! 
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων  
http://login.yahoo.com/config/mail?.intl=gr 

Re: HELLLLLLLLLLLPPPPPPP

2006-05-17 Thread Davanum Srinivas

Please log a JIRA bug, let's take it from there. Need to upload your
original WSDL as well after u create the bug report.

thanks,
dims

On 5/17/06, Amitesh Pandya <[EMAIL PROTECTED]> wrote:

Hi Dims,
Thanks for taking some time out for my query.

I tried your build() but the whole thing seem to hang after I call
build. Nothing else happen.

I'll re- explain me problem:

1) I've got a service Skeleton generated from WSDL (No problem in that:)
2) I invoke the service and I can receive the message sucessfully and
it all works like a charm (Wonderful:)

3) I then (In my Service Skeleton Class) validate the received message
and want to fail (Because of any application logic) and as a failure I
want to throw an exception.

There comes the problem: because once the Exception is thrown from the
 Service Skeleton class it goes to the
"DeliverPortMessageReceiverInOnly.java" which in turn throws Axis
fault
then it goes to the "AxisServlet "
 which then calls "handleFault()"
which in turn calls "AxisEngine" "createFaultMessageContext()"
Here in this method the Header is tried to be retrieved which causes
the exception as mentioned in my Veru first mail.

Please suggest whre am I going wrong??

I'm attaching the Source for the "Skeleton" and the
"DeliverPortMessageReceiverInOnly.java" In the later one I tried to
create a SOAP fault as well unfortunately that also dosen't work.

Please advise. It is very critical to my project

Kind Regards
Amitesh



On 17/05/06, Davanum Srinivas <[EMAIL PROTECTED]> wrote:
> Please try editing DeliverPortMessageReceiverInOnly.java and call a
> build() on the envelope just before the call to the getHeader()
> [DeliverPortMessageReceiverInOnly.java:102?]
>
> thanks,
> dims
>
> On 5/17/06, Amitesh Pandya <[EMAIL PROTECTED]> wrote:
> > Come on ! I can't believe no one has got this error???
> >
> > I know you've got the answer. Please let me know
> >
> > Here is the problem Again.
> >
> > Hi,
> > I'm currently working on project and we are using Axis2 + Sandesha2
> > (Both Version 1.0) for the WS-RM.
> >
> > One of my requirements is to return a SOAP Fault after the validation fails.
> >
> > I've created the service using WSDL2Java. The service works fine.
> > But when I try to throw an exception (Axis Fault) from the generated
> > "Skeleton" I get another Axis exception.
> >
> > I looked into it and it seems to be a problem with the AXIOM.
> > The real problem happens when I try to call
> >
> > inMessage.getEnvelope().getHeader()
> >
> > Actually this method is called in the "AxisEngine" which is causing
> > all the troubles.
> >
> > Please let me know if this is the known problem or If I'm missing something.
> >
> > Kindly suggest what is the best way of sending the Custom SOAP Fault.
> >
> > Your response to this query is greatly appreciated.
> >
> > Thanks in advance
> > Amitesh
> >
> > Please find the attached Stacktrace:
> >
> > ##
> >
> > [16/05/06 11:22:49:505 BST] 0035 SystemErr R
> > org.apache.axiom.om.OMException
> >at 
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
> >at 
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java(Compiled
> > Code))
> >at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222)
> >at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76)
> >at 
uk.gov.cjse.schemas.DeliverPortMessageReceiverInOnly.invokeBusinessLogic(DeliverPortMessageReceiverInOnly.java:102)
> >at 
org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34)
> >at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
> >at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
> >at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
> >at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
> >at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
> >at 
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
> >at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
> >at 
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
> >at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
> >at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
> >at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
> >at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.han

Re: HELLLLLLLLLLLPPPPPPP

2006-05-17 Thread Amitesh Pandya

Hi Dims,
Thanks for taking some time out for my query.

I tried your build() but the whole thing seem to hang after I call
build. Nothing else happen.

I'll re- explain me problem:

1) I've got a service Skeleton generated from WSDL (No problem in that:)
2) I invoke the service and I can receive the message sucessfully and
it all works like a charm (Wonderful:)

3) I then (In my Service Skeleton Class) validate the received message
and want to fail (Because of any application logic) and as a failure I
want to throw an exception.

There comes the problem: because once the Exception is thrown from the
Service Skeleton class it goes to the
"DeliverPortMessageReceiverInOnly.java" which in turn throws Axis
fault
then it goes to the "AxisServlet "
which then calls "handleFault()"
which in turn calls "AxisEngine" "createFaultMessageContext()"
Here in this method the Header is tried to be retrieved which causes
the exception as mentioned in my Veru first mail.

Please suggest whre am I going wrong??

I'm attaching the Source for the "Skeleton" and the
"DeliverPortMessageReceiverInOnly.java" In the later one I tried to
create a SOAP fault as well unfortunately that also dosen't work.

Please advise. It is very critical to my project

Kind Regards
Amitesh



On 17/05/06, Davanum Srinivas <[EMAIL PROTECTED]> wrote:

Please try editing DeliverPortMessageReceiverInOnly.java and call a
build() on the envelope just before the call to the getHeader()
[DeliverPortMessageReceiverInOnly.java:102?]

thanks,
dims

On 5/17/06, Amitesh Pandya <[EMAIL PROTECTED]> wrote:
> Come on ! I can't believe no one has got this error???
>
> I know you've got the answer. Please let me know
>
> Here is the problem Again.
>
> Hi,
> I'm currently working on project and we are using Axis2 + Sandesha2
> (Both Version 1.0) for the WS-RM.
>
> One of my requirements is to return a SOAP Fault after the validation fails.
>
> I've created the service using WSDL2Java. The service works fine.
> But when I try to throw an exception (Axis Fault) from the generated
> "Skeleton" I get another Axis exception.
>
> I looked into it and it seems to be a problem with the AXIOM.
> The real problem happens when I try to call
>
> inMessage.getEnvelope().getHeader()
>
> Actually this method is called in the "AxisEngine" which is causing
> all the troubles.
>
> Please let me know if this is the known problem or If I'm missing something.
>
> Kindly suggest what is the best way of sending the Custom SOAP Fault.
>
> Your response to this query is greatly appreciated.
>
> Thanks in advance
> Amitesh
>
> Please find the attached Stacktrace:
>
> ##
>
> [16/05/06 11:22:49:505 BST] 0035 SystemErr R
> org.apache.axiom.om.OMException
>at 
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
>at 
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java(Compiled
> Code))
>at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222)
>at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76)
>at 
uk.gov.cjse.schemas.DeliverPortMessageReceiverInOnly.invokeBusinessLogic(DeliverPortMessageReceiverInOnly.java:102)
>at 
org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34)
>at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
>at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
>at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
>at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
>at 
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
>at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
>at 
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
>at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
>at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
>at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
>at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
>at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
>at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
>at 
com.ibm.ws.tcp.channel.impl.NewCon

Data binding problem (xmlbeans) - binding subelement to toplevel element?

2006-05-17 Thread Andrew Cohen
Apologies in advance if this is known problem, but I'm hoping the answer to
this is easy...

I can't seem to get passed a data binding problem in my client stub on a
response for a very simple scenario. It appears that the client stub is
trying to bind a subelement of my response ("testid") to the top level
element ("testSearchResponse").

The error is:

Exception: Data Binding Error caused by:

Caused by: org.apache.xmlbeans.XmlException: error: The document is not a
[EMAIL PROTECTED]://net.semandex.searchservice.webservice/xsd:
document element local name mismatch expected testSearchResponseParam got
testid

Here is the simple WSDL:

// TYPES














// MESSAGES

  






// PORTTYPE

   
  
  
   


// BINDING

http://schemas.xmlsoap.org/soap/http"/>
   
  
 
http://net.semandex.search.service/Search";
use="literal"/>
 
 
http://net.semandex.search.service/Search";
use="literal"/>
 
   



Thanks,
Andrew






Re: Axis 1.4 and security

2006-05-17 Thread Rodrigo Ruiz
In addition to this, Axis directly supports the HTTPS protocol for 
sending and receiving messages.


Anne Thomas Manes wrote:

WSS4J is a plug-in module that adds support for WS-Security to Axis1.

Anne

On 5/17/06, *Santunu Podder* <[EMAIL PROTECTED] 
> wrote:


Hi All,

Does Axis 1.4 have any support for security ?

Have anybody in the group implemented public / private key kind of
security in web services ?
I am new to security so any help will be appreciated.

Thanks,
Santunu


This message (including any attachments) is confidential and may be
privileged. If you have received it by mistake please notify the
sender by return e-mail and delete this message from your system.
Any unauthorised use or dissemination of this message in whole or in
part is strictly prohibited. Please note that e-mails are
susceptible to change. Close Premium Finance shall not be liable for
the improper or incomplete transmission of the information contained
in this communication nor for any delay in its receipt or damage to
your system. Close Premium Finance does not guarantee that the
integrity of this communication has been maintained nor that this
communication is free of viruses, interceptions or interference.





No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date: 16/05/2006


--
---
GRIDSYSTEMSRodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorcamailto:[EMAIL PROTECTED]
Baleares - España  Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
---


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date: 16/05/2006



Re: Axis 1.4 and security

2006-05-17 Thread Anne Thomas Manes
For .NET you need to use WSE 3.0. See http://www.microsoft.com/downloads/details.aspx?familyid=018a09fd-3a74-43c5-8ec1-8d789091255d&displaylang=en
AnneOn 5/17/06, Santunu Podder <[EMAIL PROTECTED]> wrote:
Thanks Anne.Can I use this for my senario ? I have implemented the web service in javabut the client is in .Net.How will the client pass the authentication information in the request?
"Anne Thomas Manes" <[EMAIL PROTECTED]>17/05/2006 15:47Please respond toaxis-user@ws.apache.org
Toaxis-user@ws.apache.orgccSubjectRe: Axis 1.4 and securityWSS4J is a plug-in module that adds support for WS-Security to Axis1.
AnneOn 5/17/06, Santunu Podder <[EMAIL PROTECTED] > wrote:Hi All,Does Axis 1.4 have any support for security ?Have anybody in the group implemented public / private key kind of
security in web services ?I am new to security so any help will be appreciated.Thanks,SantunuThis message (including any attachments) is confidential and may beprivileged. If you have received it by mistake please notify the sender by
return e-mail and delete this message from your system. Any unauthoriseduse or dissemination of this message in whole or in part is strictlyprohibited. Please note that e-mails are susceptible to change. Close
Premium Finance shall not be liable for the improper or incompletetransmission of the information contained in this communication nor forany delay in its receipt or damage to your system. Close Premium Finance
does not guarantee that the integrity of this communication has beenmaintained nor that this communication is free of viruses, interceptionsor interference.
This email has been scanned for all viruses by the MessageLabs SkyScanservice.This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. Close Premium Finance shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Close Premium Finance does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference.



Re: Using Axis for WSDL parsing and SOAP Message generation

2006-05-17 Thread Anne Thomas Manes
There are two standard Java APIs:1- WSDL4J (http://sourceforge.net/projects/wsdl4j) provides an API for walking a WSDL document. (You need a different API for walking the Schema, though.)
2- SAAJ (implemented in Axis) provides an API for constructing a SOAP message.AnneOn 5/17/06, Reto Mayer <
[EMAIL PROTECTED]> wrote:Hello,I am new to Axis and didn't find anything about this in the docs, so
here it goes. I am trying to use Axis for two things:1) I want to read already-existing WSDL to find out about the structureof (XML Schema-based) message parts. I am imagining an API which wouldallow me to "walk" the WSDL operations, messages, parts, and data types.
All of this, however, without generating any Java code with WSDL2Java,but on the fly. Axis does this inside WSDL2Java - is there some simpleexample for this / is this a use case for Axis at all? I tried reading
the WSDL2Java code but got lost and confused.2) I want to generate SOAP messages based on "literal" XML Elements. TheXML elements are valid according to an XML Schema and have the datatypes required for message parts of WSDL (either basic or complex). What
I'm trying to do is read the WSDL, specify a binding and message fromthat WSDL, and have Axis serialize (not send) the message with my XMLelements to whatever binding/encoding is selected in thewsdl-binding/operation. Is this possible? How? Could anyone post a code
example?Could anyone point me into the right direction? Thanks!Reto


Axis 1.4 and security

2006-05-17 Thread Santunu Podder
Hi All,

Does Axis 1.4 have any support for security ?

Have anybody in the group implemented public / private key kind of 
security in web services ? 
I am new to security ...so any advice will be of great help.

Thanks,
Santunu



This message (including any attachments) is confidential and may be privileged. 
If you have received it by mistake please notify the sender by return e-mail 
and delete this message from your system. Any unauthorised use or dissemination 
of this message in whole or in part is strictly prohibited. Please note that 
e-mails are susceptible to change. Close Premium Finance shall not be liable 
for the improper or incomplete transmission of the information contained in 
this communication nor for any delay in its receipt or damage to your system. 
Close Premium Finance does not guarantee that the integrity of this 
communication has been maintained nor that this communication is free of 
viruses, interceptions or interference.


Re: Axis 1.4 and security

2006-05-17 Thread Santunu Podder
Thanks Anne.

Can I use this for my senario ? I have implemented the web service in java 
but the client is in .Net.
How will the client pass the authentication information in the request?






"Anne Thomas Manes" <[EMAIL PROTECTED]> 
17/05/2006 15:47
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: Axis 1.4 and security






WSS4J is a plug-in module that adds support for WS-Security to Axis1.

Anne 

On 5/17/06, Santunu Podder <[EMAIL PROTECTED] > wrote:
Hi All,

Does Axis 1.4 have any support for security ?

Have anybody in the group implemented public / private key kind of 
security in web services ?
I am new to security so any help will be appreciated.

Thanks,
Santunu


This message (including any attachments) is confidential and may be 
privileged. If you have received it by mistake please notify the sender by 
return e-mail and delete this message from your system. Any unauthorised 
use or dissemination of this message in whole or in part is strictly 
prohibited. Please note that e-mails are susceptible to change. Close 
Premium Finance shall not be liable for the improper or incomplete 
transmission of the information contained in this communication nor for 
any delay in its receipt or damage to your system. Close Premium Finance 
does not guarantee that the integrity of this communication has been 
maintained nor that this communication is free of viruses, interceptions 
or interference. 



This email has been scanned for all viruses by the MessageLabs SkyScan
service.


This message (including any attachments) is confidential and may be privileged. 
If you have received it by mistake please notify the sender by return e-mail 
and delete this message from your system. Any unauthorised use or dissemination 
of this message in whole or in part is strictly prohibited. Please note that 
e-mails are susceptible to change. Close Premium Finance shall not be liable 
for the improper or incomplete transmission of the information contained in 
this communication nor for any delay in its receipt or damage to your system. 
Close Premium Finance does not guarantee that the integrity of this 
communication has been maintained nor that this communication is free of 
viruses, interceptions or interference.


Re: Axis 1.4 and security

2006-05-17 Thread Anne Thomas Manes
WSS4J is a plug-in module that adds support for WS-Security to Axis1.Anne On 5/17/06, Santunu Podder <[EMAIL PROTECTED]
> wrote:Hi All,Does Axis 1.4 have any support for security ?Have anybody in the group implemented public / private key kind of
security in web services ?I am new to security so any help will be appreciated.Thanks,SantunuThis message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. Close Premium Finance shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Close Premium Finance does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference.



Re: Omit SOAPAction from Http header

2006-05-17 Thread Anne Thomas Manes
It's not a valid SOAP 1.1 over HTTP message if you omit the SOAPAction header. Axis will not permit you to generate an invalid message. You will have to intercept the message after it leaves Axis and remove the header.
On 5/17/06, Roy <[EMAIL PROTECTED]> wrote:
Hello,I am using AXIS to call a web service with a static stub client.I have a problem with the HttpHeader generated from AXIS. I want to omit completely the SOAPAction field because the web service i want to call isn't able to understand this field. I have have set the SOAPAction value to "" but i had the same results. How can i remove it completely?
Thank you.
		 
Χρησιμοποιείτε Yahoo! 
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων  
http://login.yahoo.com/config/mail?.intl=gr 



CalendarSerializer dateTime bug?

2006-05-17 Thread Patrick.Coray
Title: CalendarSerializer dateTime bug?






Hi all


I tried to serialize a dateTime where I have a Calendar with date "0001-01-01"

When Axis serializes it would use UTC. All ok. 

As im located central europe my date is CET and it creates the UTC -1 Hour.


Now I get the value:   "0001-12-31T23:00:00.000Z" 

Should it not add additionally the sign "-" in front of, so that I would receive "-0001-12-31T23:00:00.000Z"?


The problem is in deserialisation where I get the date "0002-01-01".


XSD-Type in WSDL



    

    





Using Axis 1.2.1 (but same behavior in higher versions, see CalendarSerializer in CVS).

The DateSerializer checks with an internal calendar for BC or AD, but I do not understand how

there the calendar should go BC..., perhaps when the computer time is BC?


Should the CalendarSerializer not check the value (should be a java.util.Calendar) if it is

BC or AD and add a "-"?


Thanks

Patrick


---


public class CalendarSerializer implements SimpleValueSerializer {


    public String getValueAsString(Object value, SerializationContext context) {

    Date date = value instanceof Date ? (Date) value :

    ((Calendar) value).getTime();


    // Serialize including convert to GMT

    synchronized (zulu) {

    // Sun JDK bug http://developer.java.sun.com/developer/bugParade/bugs/4229798.html

    return zulu.format(date);

    }

    }

}


public class DateSerializer implements SimpleValueSerializer {


    private static Calendar calendar = Calendar.getInstance();


    public String getValueAsString(Object value, SerializationContext context) {

    StringBuffer buf = new StringBuffer();

    synchronized (calendar) {

    if(value instanceof Calendar) {

    value = ((Calendar)value).getTime();

    } 

    if (calendar.get(Calendar.ERA) == GregorianCalendar.BC) {

    buf.append("-");

    calendar.setTime((Date)value);

    calendar.set(Calendar.ERA, GregorianCalendar.AD);

    value = calendar.getTime();

    }

    buf.append(zulu.format((Date)value));

    }

    return buf.toString();

    }

}





Re: HELLLLLLLLLLLPPPPPPP

2006-05-17 Thread Davanum Srinivas

Please try editing DeliverPortMessageReceiverInOnly.java and call a
build() on the envelope just before the call to the getHeader()
[DeliverPortMessageReceiverInOnly.java:102?]

thanks,
dims

On 5/17/06, Amitesh Pandya <[EMAIL PROTECTED]> wrote:

Come on ! I can't believe no one has got this error???

I know you've got the answer. Please let me know

Here is the problem Again.

Hi,
I'm currently working on project and we are using Axis2 + Sandesha2
(Both Version 1.0) for the WS-RM.

One of my requirements is to return a SOAP Fault after the validation fails.

I've created the service using WSDL2Java. The service works fine.
But when I try to throw an exception (Axis Fault) from the generated
"Skeleton" I get another Axis exception.

I looked into it and it seems to be a problem with the AXIOM.
The real problem happens when I try to call

inMessage.getEnvelope().getHeader()

Actually this method is called in the "AxisEngine" which is causing
all the troubles.

Please let me know if this is the known problem or If I'm missing something.

Kindly suggest what is the best way of sending the Custom SOAP Fault.

Your response to this query is greatly appreciated.

Thanks in advance
Amitesh

Please find the attached Stacktrace:

##

[16/05/06 11:22:49:505 BST] 0035 SystemErr R
org.apache.axiom.om.OMException
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
   at 
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java(Compiled
Code))
   at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222)
   at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76)
   at 
uk.gov.cjse.schemas.DeliverPortMessageReceiverInOnly.invokeBusinessLogic(DeliverPortMessageReceiverInOnly.java:102)
   at 
org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34)
   at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
   at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
   at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
   at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
   at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
   at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
   at 
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
   at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
   at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
   at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
   at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
   at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
   at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
   at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
   at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
   at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
   at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
   at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)




--
Davanum Srinivas : http://wso2.com/blogs/


Re: [Axis2] ServiceClient.addStringHeader() problems

2006-05-17 Thread Davanum Srinivas

What do you see on the wire? can u please try tcpmon or some other
mechanism to look at the actual soap messages?

thanks.,
dims

On 5/17/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:

Hi all,

I noticed that the calls ServiceClient.addStringHeader() and
ServiceClient.addHeader() cause the message to be not received.

Any idea?

Michele




--
Davanum Srinivas : http://wso2.com/blogs/


Re: [Axis2] How To change the Provider in Axis2?

2006-05-17 Thread Davanum Srinivas

Please see RPCMessageReceiver in codegen maven module

On 5/17/06, Wolters, Oliver <[EMAIL PROTECTED]> wrote:




Hi All,

I have an existing System with CORBA-Interfaces that I want to publish as
Web Services without to do any coding when the interfaces change. In Axis
1.X I've done the that by extending the existing RPC-Provider and overwrite
the makeNewServiceObject( )-methode so that it looks up the references to
the implementation of the services in a CORBA-NamingService (like the
CORBAProvider does). That only works for the first interface, but the
references to the other interfaces (services) are retrieved from our system
by calling factory-methods. So I had to rewrite the Provider to receive the
references to the first interface from the NamingService and to all other
service implementations from a call to a factory method. The references to
the services are stored in the SessionContext. This all works fine. But now
I want to migrate to Axis2 and I can't find any documantation how to migrate
the Custum Provider that is neccessary for me.

Thanks for any help.

Oliver Wolters

--
ProCom Systemhaus und
Ingenieurunternehmen GmbH
Luisenstr. 41 - D-52070 Aachen

Tel. ჽ 241 51804-181
Fax ჽ 241 51804-30
http://www.procom.de
mailto:[EMAIL PROTECTED]




--
Davanum Srinivas : http://wso2.com/blogs/


Re: Spring Support commited

2006-05-17 Thread Christian Dupuis

Hi Robert,

thanks for following up and your feedback. I added some comments below.

Quoting robert lazarski <[EMAIL PROTECTED]>:


Christian, great to know we have members of the Spring participating on the
list! Lets see how we can improve what we've got. See my comments inline:

On 5/17/06, Christian Dupuis <[EMAIL PROTECTED]> wrote:


Hi all,

nice to see that the Spring integration topic has been kicked up
by the Axis team. I have a couple of comments regarding the code
that has been commited:

- I don't see why you introduced the ApplicationContextHolder with a
  static reference to the Spring ApplicationContext. There is another
  way to get the ApplicationContext that you should consider, because
  with that non invasive approach there is no need to configure a
  proprietary Axis2 ApplicationContextHolder in the Spring config.

  When using Spring's ContextLoader(Servlet|Listener) the
ApplicationContext
  is exposed in the ServletContext. And the ServletContext itself is
  exposed in Axis2's MessageContext properties. Using that approach the
  SpringAbstractMessageReceiver's makeNewServiceObject can be changed to

 ServletContext oServletContext = (ServletContext)
msgContext.getOptions().
getProperty(Constants.SERVLET_CONTEXT);
 ApplicationContext aCtx =
WebApplicationContextUtils.getWebApplicationContext(oServletContext);

   and the ApplicationContextHolder class can be removed.




I was aware of the ServletContext approach but chose not to use it for one
simple reason: Axis2 supports other transports such as SMTP and TCP, and
therefore, does not always run in a servlet container. So I didn't want to
make a rule that I must always be able to get a servlet context. Perhaps
others can comment here, but that was the choice I made. It just so happens,
Christian, that you're the right person to ask about this:

Suppose someone wants to use Axis2 in Spring IDE. In some cases they want to
be a client to an axis2 service and in other cases they are the actual
service. They've choosen TCP as the transport for synchronous services and
SMTP for asynchonous services. In that scenario, from a Spring IDE
perspective,  how might makeNewServiceObject() get a reference to
ApplicationContext?

While the ApplicationContextHolder class is simple, if possible I'm all for
removing it.


IMHO static references in Axis2's Classloading setup will cause problems.

The problem with the different transports and how to get access to the
Spring ApplicationContext is why I suggest to implement a support superclass
(using parameter with name ServiceClass) which hooks into Axis2 
lifecycle using

init/destroy/configure Methods via DependencyManager.

Speaking about different transports another problem comes up: How should the
Spring ApplicationContext be loaded in a JMS or Mail transport environment?

That superclass can leverage a pluggable strategy which is responsible for
locating or loading a Spring Application Context. The ApplicationContext can
then be exposed using one of the Axis2 Context implementations as a property.
That is very much inline with the ServletEndpointSupport for Spring's Axis 1.x
integration and enables you guys to streamline your receiver 
implementations and

add different data bindings without the need to bother with the Spring
integration.

If I were you (or a member of the Axis2 team) I would actually delegate the
concern of loading/maintaining/locating a Spring context to the Spring team.


- I'm not quite sure if the choosen approach to integrate Spring with
  Axis2 on the server-side is the best. Basically that is because invoking
  Spring beans as a pojo service implementations now becomes a concern for
the
  Receiver implementation. With the current Receiver architecture (which
needs
  refactoring btw.) you end up implementing different message receivers
for
  "plain" Axis2 and for the integration with Spring (as you did with
RawXML
  and RPC) which are bascially copies of each other in order to integrate
  different data binding frameworks.

  IMHO there are two possible solutions for that: You can refactor the
  receiver stuff incl. Axis2's core receivers to provide better extension
  points (template methods to invoke business logic). Or you can choose a
  different approach to integrate Spring which is not aware of actual
message
  receiving.

  The last approach can be implemented by providing a superclass for Axis2
  pojo based service objects. That superclass can access the Spring
  ApplicationContext and provide the required business logic Spring bean
to
  invoke. That is quite similiar to Spring's JAX-RPC (based on Axis 1.x)
  integration; look into ServletEndpointSupport.
  calling business logic)



There at least needs to be refactoring on the implementation of the
Spring*Receivers. The other points I'll try to bring up in our scheduled IRC
chat later today.

If there is anything I can do further clarify the above, please let me know.


Cheers
Christian

[Axis2] Maven plugin

2006-05-17 Thread Ken Campbell
Hi,

Codehaus seems to be down today and I'm trying to build the Axis2 source
with maven. Could some kind person please e-mail me
maven-itest-plugin-1.0.jar? It does not appear to exist at Apache any more;
all the links are dead.

Thanks very much.

Ken



Re: Spring Support commited

2006-05-17 Thread robert lazarski
I'm on IRC channel #apache-axis if anyone want's to discuss this. 


Robert

http://www.braziloutsource.com/On 5/17/06, 
robert lazarski <[EMAIL PROTECTED]> wrote:
Christian, great to know we have members of the Spring participating on
the list! Lets see how we can improve what we've got. See my comments
inline: On 5/17/06, Christian Dupuis <
[EMAIL PROTECTED]> wrote:
Hi all,nice to see that the Spring integration topic has been kicked upby the Axis team. I have a couple of comments regarding the codethat has been commited:- I don't see why you introduced the ApplicationContextHolder with a
  static reference to the Spring ApplicationContext. There is another  way to get the ApplicationContext that you should consider, because  with that non invasive approach there is no need to configure a  proprietary Axis2 ApplicationContextHolder in the Spring config.
  When using Spring's ContextLoader(Servlet|Listener) the ApplicationContext  is exposed in the ServletContext. And the ServletContext itself is  exposed in Axis2's MessageContext properties. Using that approach the
  SpringAbstractMessageReceiver's makeNewServiceObject can be changed to ServletContext oServletContext = (ServletContext) msgContext.getOptions().getProperty(Constants.SERVLET_CONTEXT

); ApplicationContext aCtx =WebApplicationContextUtils.getWebApplicationContext(oServletContext);   and the ApplicationContextHolder class can be removed.

I was aware of the ServletContext approach but chose not to use it for
one simple reason: Axis2 supports other transports such as SMTP and
TCP, and therefore, does not always run in a servlet container. So I
didn't want to make a rule that I must always be able to get a servlet
context. Perhaps others can comment here, but that was the choice I
made. It just so happens, Christian, that you're the right person to
ask about this: 

Suppose someone wants to use Axis2 in Spring IDE. In some cases they
want to be a client to an axis2 service and in other cases they are the
actual service. They've choosen TCP as the transport for synchronous
services and SMTP for asynchonous services. In that scenario, from a
Spring IDE  perspective,  how might makeNewServiceObject()
get a reference to ApplicationContext?

While the ApplicationContextHolder class is simple, if possible I'm all for removing it. 
  - I'm not quite sure if the choosen approach to integrate Spring with
  Axis2 on the server-side is the best. Basically that is because invoking
  Spring beans as a pojo service implementations now becomes a concern for the  Receiver implementation. With the current Receiver architecture (which needs  refactoring btw.) you end up implementing different message receivers for
  "plain" Axis2 and for the integration with Spring (as you did with RawXML  and RPC) which are bascially copies of each other in order to integrate  different data binding frameworks.  IMHO there are two possible solutions for that: You can refactor the
  receiver stuff incl. Axis2's core receivers to provide better extension  points (template methods to invoke business logic). Or you can choose a  different approach to integrate Spring which is not aware of actual message
  receiving.  The last approach can be implemented by providing a superclass for Axis2  pojo based service objects. That superclass can access the Spring  ApplicationContext and provide the required business logic Spring bean to
  invoke. That is quite similiar to Spring's JAX-RPC (based on Axis 1.x)  integration; look into ServletEndpointSupport.  calling business logic)
There at least needs to be refactoring on the implementation of the
Spring*Receivers. The other points I'll try to bring up in our
scheduled IRC chat later today. 
If there is anything I can do further clarify the above, please let me know.

CheersChristian-Spring IDEhttp://springide.org

Thanks Christian for the constructive feedback. I'll post messages to the dev list when we get some progess here. 

Robert
http://www.braziloutsource.com/




Re: passing XML document as input parameter

2006-05-17 Thread Xinjun Chen
Hi Dies, 
 
Thank you! You are right. In fact I can do that :-). Just need to replace all "<" by "<".  Regards, 
Xinjun
 
On 5/17/06, Dies Koper <[EMAIL PROTECTED]> wrote:
Hello Xinjun,Just use a String type field.Axis will replace the '<'s and '>'s in your XML with '<'s resp.
'>'s, making it valid XML content.Regards,DiesSuavi Ali Demir wrote:> Why can you not embed xml inside xml?>   Regards,>   Ali>> Xinjun Chen <
[EMAIL PROTECTED]> wrote:> As far as I know, I cannot embed XML inside XML, so how can I pass an XML document as an input parameter to a web service?>   Could anyone provide some pointer on that?
>>   Regards,>   Xinjun


Re: [Axis2] MessageContext & properties

2006-05-17 Thread Deepal Jayasinghe
Hi Michele;
pls see my comments below;

Michele Mazzucco wrote:

>Hi all,
>
>how can I get all properties from a message context? It seems to me that
> the getProperty(key) method checks not only the options, but also
>operation context, etc., so maybe msgCtx.getOptions().getProperties() is
>not correct.
>  
>
You can not get all the properties from message context , I mean as a
map. But if you know the key then you can get the property from message
context very easily.
Ya , when some one ask property from the message context it is required
to search entire hierarchy to find the property until it finds the property.

msgCtx.getOptions().getProperties() , its not give you all the properties in 
the message context


>
>Thanks in advance,
>Michele
>
>
>  
>

-- 
Thanks,
Deepal

~Future is Open~ 




[Axis2] ServiceClient.addStringHeader() problems

2006-05-17 Thread Michele Mazzucco
Hi all,

I noticed that the calls ServiceClient.addStringHeader() and
ServiceClient.addHeader() cause the message to be not received.

Any idea?

Michele


[axis2] mustunderstand attribute in SOAP-Header

2006-05-17 Thread donnerdrummel2000-mailing
Hi,

I still have the problem that I doesn't know a nice
solution for attaching 'mustUnderstand' attributes to
a soap header, using axis2 1.0.

So, is there someone who has a solution for that?

Thanks Ted






___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


[Axis2] How To change the Provider in Axis2?

2006-05-17 Thread Wolters, Oliver
Title: [Axis2] How To change the Provider in Axis2?






Hi All,


I have an existing System with CORBA-Interfaces that I want to publish as Web Services without to do any coding when the interfaces change. In Axis 1.X I've done the that by extending the existing RPC-Provider and overwrite the makeNewServiceObject( )-methode so that it looks up the references to the implementation of the services in a CORBA-NamingService (like the CORBAProvider does). That only works for the first interface, but the references to the other interfaces (services) are retrieved from our system by calling factory-methods. So I had to rewrite the Provider to receive the references to the first interface from the NamingService and to all other service implementations from a call to a factory method. The references to the services are stored in the SessionContext. This all works fine. But now I want to migrate to Axis2 and I can't find any documantation how to migrate the Custum Provider that is neccessary for me.

Thanks for any help.


Oliver Wolters


--

ProCom Systemhaus und

Ingenieurunternehmen GmbH

Luisenstr. 41 - D-52070 Aachen

 

Tel. ჽ 241 51804-181

Fax ჽ 241 51804-30

http://www.procom.de

mailto:[EMAIL PROTECTED]






Re: Spring Support commited

2006-05-17 Thread robert lazarski
Christian, great to know we have members of the Spring participating on
the list! Lets see how we can improve what we've got. See my comments
inline: On 5/17/06, Christian Dupuis <[EMAIL PROTECTED]> wrote:
Hi all,nice to see that the Spring integration topic has been kicked upby the Axis team. I have a couple of comments regarding the codethat has been commited:- I don't see why you introduced the ApplicationContextHolder with a
  static reference to the Spring ApplicationContext. There is another  way to get the ApplicationContext that you should consider, because  with that non invasive approach there is no need to configure a  proprietary Axis2 ApplicationContextHolder in the Spring config.
  When using Spring's ContextLoader(Servlet|Listener) the ApplicationContext  is exposed in the ServletContext. And the ServletContext itself is  exposed in Axis2's MessageContext properties. Using that approach the
  SpringAbstractMessageReceiver's makeNewServiceObject can be changed to ServletContext oServletContext = (ServletContext) msgContext.getOptions().getProperty(Constants.SERVLET_CONTEXT
); ApplicationContext aCtx =WebApplicationContextUtils.getWebApplicationContext(oServletContext);   and the ApplicationContextHolder class can be removed.

I was aware of the ServletContext approach but chose not to use it for
one simple reason: Axis2 supports other transports such as SMTP and
TCP, and therefore, does not always run in a servlet container. So I
didn't want to make a rule that I must always be able to get a servlet
context. Perhaps others can comment here, but that was the choice I
made. It just so happens, Christian, that you're the right person to
ask about this: 

Suppose someone wants to use Axis2 in Spring IDE. In some cases they
want to be a client to an axis2 service and in other cases they are the
actual service. They've choosen TCP as the transport for synchronous
services and SMTP for asynchonous services. In that scenario, from a
Spring IDE  perspective,  how might makeNewServiceObject()
get a reference to ApplicationContext?

While the ApplicationContextHolder class is simple, if possible I'm all for removing it. 
  - I'm not quite sure if the choosen approach to integrate Spring with  Axis2 on the server-side is the best. Basically that is because invoking
  Spring beans as a pojo service implementations now becomes a concern for the  Receiver implementation. With the current Receiver architecture (which needs  refactoring btw.) you end up implementing different message receivers for
  "plain" Axis2 and for the integration with Spring (as you did with RawXML  and RPC) which are bascially copies of each other in order to integrate  different data binding frameworks.  IMHO there are two possible solutions for that: You can refactor the
  receiver stuff incl. Axis2's core receivers to provide better extension  points (template methods to invoke business logic). Or you can choose a  different approach to integrate Spring which is not aware of actual message
  receiving.  The last approach can be implemented by providing a superclass for Axis2  pojo based service objects. That superclass can access the Spring  ApplicationContext and provide the required business logic Spring bean to
  invoke. That is quite similiar to Spring's JAX-RPC (based on Axis 1.x)  integration; look into ServletEndpointSupport.  calling business logic)
There at least needs to be refactoring on the implementation of the
Spring*Receivers. The other points I'll try to bring up in our
scheduled IRC chat later today. 
If there is anything I can do further clarify the above, please let me know.
CheersChristian-Spring IDEhttp://springide.org

Thanks Christian for the constructive feedback. I'll post messages to the dev list when we get some progess here. 

Robert
http://www.braziloutsource.com/


Omit SOAPAction from Http header

2006-05-17 Thread Roy
Hello,I am using AXIS to call a web service with a static stub client.I have a problem with the HttpHeader generated from AXIS. I want to omit completely the SOAPAction field because the web service i want to call isn't able to understand this field. I have have set the SOAPAction value to "" but i had the same results. How can i remove it completely?Thank you.
		 
Χρησιμοποιείτε Yahoo! 
Βαρεθήκατε τα ενοχλητικά μηνύ ματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων  
http://login.yahoo.com/config/mail?.intl=gr 

[Axis2] MessageContext & properties

2006-05-17 Thread Michele Mazzucco
Hi all,

how can I get all properties from a message context? It seems to me that
 the getProperty(key) method checks not only the options, but also
operation context, etc., so maybe msgCtx.getOptions().getProperties() is
not correct.


Thanks in advance,
Michele


Axis 1.4 and security

2006-05-17 Thread Santunu Podder
Hi All,

Does Axis 1.4 have any support for security ?

Have anybody in the group implemented public / private key kind of 
security in web services ? 
I am new to security so any help will be appreciated.

Thanks,
Santunu


This message (including any attachments) is confidential and may be privileged. 
If you have received it by mistake please notify the sender by return e-mail 
and delete this message from your system. Any unauthorised use or dissemination 
of this message in whole or in part is strictly prohibited. Please note that 
e-mails are susceptible to change. Close Premium Finance shall not be liable 
for the improper or incomplete transmission of the information contained in 
this communication nor for any delay in its receipt or damage to your system. 
Close Premium Finance does not guarantee that the integrity of this 
communication has been maintained nor that this communication is free of 
viruses, interceptions or interference.


Re: Select the output-network-interface to call an axis-webservice

2006-05-17 Thread Rodrigo Ruiz

Hi Carsten,

The reason why you haven't seen a client-config.wsdd file is because 
there is a default one into the axis jar :-)


You can simply copy it (it is in the org.apache.axis.client package) to 
your working directory, and modify it to set your own configuration. 
Your application will look for it in its working directory before 
defaulting to the one in the jar.


The class I passed you should work also for Axis 1.3. Anyway, Axis 1.4 
is a final release, and it corrects some memory leaks among other 
things, so I guess you should better use 1.4 ;-)


Cheers,
Rodrigo

Carsten Schmidt wrote:

Hi Alain,
Hi Rodrigo,

that's great! Your solution-samples are looking incredible. I hope, I'll
find time to realise it the next days.

I'm just a bit confused about the client-config.wsdd-file because I
don't have such a file right now.
Sure I know the server-config.wsdd, but a clientprogram will not be
deployed, or will it?

And if the program never used this wsdd before, how can I tell it to do
so?
My experiences with axis are quite simple yet, so I am not sure I
haven't overlooked something important about this.

BTW: At the moment I'm using libraries from axis 1.3 (Download archive
from october 05).

Anyway, let me tell you I really appreciate to your support so far.

Carsten


--
---
GRIDSYSTEMSRodrigo Ruiz Aguayo
Parc Bit - Son Espanyol
07120 Palma de Mallorcamailto:[EMAIL PROTECTED]
Baleares - España  Tel:+34-971435085 Fax:+34-971435082
http://www.gridsystems.com
---


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.6.0/341 - Release Date: 16/05/2006



RE: Select the output-network-interface to call an axis-webservic e

2006-05-17 Thread Pannetier Alain
Title: RE: Select the output-network-interface to call an axis-webservice





Glad we could help you.


Rodrigo's packaging is much more professional than mine (a quick hack at best).  You just need to download his class and stick it somewhere in the classpath.

He also submitted an enhancement request for this.


About WSDD for clients :


It usually lives in axis.jar (package org.apache.axis.client) and it is the recommended way to configure transports and proxy parameters (axis2 has more options) for clients.

Folks usually take the standard wsdd out of the jar and make sure it appears before the bundled one in the classpath.  Axis 1.3 is OK for what you want to do.

Regards,


Alain


-Original Message-
From: Carsten Schmidt [mailto:[EMAIL PROTECTED]] 
Sent: 17 May 2006 10:49
To: axis-user@ws.apache.org
Subject: Re: Select the output-network-interface to call an axis-webservice


Hi Alain,
Hi Rodrigo,


that's great! Your solution-samples are looking incredible. I hope, I'll
find time to realise it the next days.


I'm just a bit confused about the client-config.wsdd-file because I
don't have such a file right now.
Sure I know the server-config.wsdd, but a clientprogram will not be
deployed, or will it?


And if the program never used this wsdd before, how can I tell it to do
so?
My experiences with axis are quite simple yet, so I am not sure I
haven't overlooked something important about this.


BTW: At the moment I'm using libraries from axis 1.3 (Download archive
from october 05).


Anyway, let me tell you I really appreciate to your support so far.


Carsten



Am Dienstag, den 16.05.2006, 16:47 +0200 schrieb Rodrigo Ruiz:
> CommonsHTTPSender is easier to subclass and modify. I pass you a
> simple  
> subclass that could do the trick :-)
> 
> HTH, 
> Rodrigo
> 
> 
> 
> package org.rodrisoft;
> 
> import java.io.FileInputStream; 
> import java.io.InputStream; 
> import java.net.InetAddress; 
> import java.net.URL; 
> import java.util.HashMap; 
> import java.util.Hashtable; 
> import java.util.Iterator; 
> import java.util.Map; 
> import java.util.Properties;
> 
> import org.apache.axis.MessageContext; 
> import org.apache.axis.transport.http.CommonsHTTPSender; 
> import org.apache.commons.httpclient.HostConfiguration; 
> import org.apache.commons.httpclient.HttpClient;
> 
> /** 
>   * Sender implementation that uses Jakarta Commons HTTP for  
> transmission, and 
>   * implements a routing map table to select a local address
> depending  
> on the 
>   * remote address to connect to. 
>   *  
>   * This sender can be configured in the client-config.wsdd file like
> this: 
>   *  
>   *    *   pivot="java:org.rodrisoft.RoutedCommonsHTTPSender"> 
>   *    value="path/to/map/file.properties"/> 
>   *    
>   *  
>   *  
>   *  
>   * The first parameter specifies a .properties file containing pairs
> in 
>   * the form: 
>   * 
>   *  
>   *   remote-addr=remote-addr 
>   *  
>   * 
>   * The second parameter is an example of how to specify a single
> route 
>   * table entry directly in the .wsdd file. 
>   *  
>   * The first parameter allows to share the route table among several 
>   * protocols. 
>   *  
>   * The local binding address can also be specified through the
> message 
>   * context. This allows services and handlers set the local address,
> and 
>   * provide smarter routing algorithms. 
>   *  
>   * Original work from Davanum Srinivas. 
>   * 
>   * @author Davanum Srinivas ([EMAIL PROTECTED]) 
>   * @author Rodrigo Ruiz ([EMAIL PROTECTED]) 
>   * @version 1.0 
>   */ 
> public class RoutedCommonsHTTPSender extends CommonsHTTPSender {
> 
>    /** 
> * serialVersionUID attribute. 
> */ 
>    private static final long serialVersionUID = -8610352356067978620L;
> 
>    /** 
> * MessageContext Property name for setting the local bind
> address. 
> */ 
>    public static final String LOCAL_BIND_ADDRESS =
> "local.bind.address";
> 
>    /** 
> * Local Bind Address Route Map. 
> */ 
>    private final Map routeTable = new HashMap();
> 
>    /** 
> * Flag that controls bindMap synchronization. 
> */ 
>    private boolean dirty = true;
> 
>    public synchronized void setOption(String name, Object value) { 
>  this.dirty = true; 
>  super.setOption(name, value); 
>    }
> 
>    public synchronized boolean setOptionDefault(String name, 
> Object value) { 
>  this.dirty = true; 
>  return super.setOptionDefault(name, value); 
>    }
> 
>    public synchronized void setOptions(Hashtable options) { 
>  this.dirty = true; 
>  super.setOptions(options); 
>    }
> 
>    protected HostConfiguration getHostConfiguration(HttpClient
> client, 
>    MessageContext context, URL targetURL) {
> 
>  HostConfiguration config = super.getHostConfiguration(client, 

Re: Select the output-network-interface to call an axis-webservice

2006-05-17 Thread Carsten Schmidt
Hi Alain,
Hi Rodrigo,

that's great! Your solution-samples are looking incredible. I hope, I'll
find time to realise it the next days.

I'm just a bit confused about the client-config.wsdd-file because I
don't have such a file right now.
Sure I know the server-config.wsdd, but a clientprogram will not be
deployed, or will it?

And if the program never used this wsdd before, how can I tell it to do
so?
My experiences with axis are quite simple yet, so I am not sure I
haven't overlooked something important about this.

BTW: At the moment I'm using libraries from axis 1.3 (Download archive
from october 05).

Anyway, let me tell you I really appreciate to your support so far.

Carsten


Am Dienstag, den 16.05.2006, 16:47 +0200 schrieb Rodrigo Ruiz:
> CommonsHTTPSender is easier to subclass and modify. I pass you a
> simple  
> subclass that could do the trick :-)
> 
> HTH, 
> Rodrigo
> 
> 
> 
> package org.rodrisoft;
> 
> import java.io.FileInputStream; 
> import java.io.InputStream; 
> import java.net.InetAddress; 
> import java.net.URL; 
> import java.util.HashMap; 
> import java.util.Hashtable; 
> import java.util.Iterator; 
> import java.util.Map; 
> import java.util.Properties;
> 
> import org.apache.axis.MessageContext; 
> import org.apache.axis.transport.http.CommonsHTTPSender; 
> import org.apache.commons.httpclient.HostConfiguration; 
> import org.apache.commons.httpclient.HttpClient;
> 
> /** 
>   * Sender implementation that uses Jakarta Commons HTTP for  
> transmission, and 
>   * implements a routing map table to select a local address
> depending  
> on the 
>   * remote address to connect to. 
>   *  
>   * This sender can be configured in the client-config.wsdd file like
> this: 
>   *  
>   *    *   pivot="java:org.rodrisoft.RoutedCommonsHTTPSender"> 
>   *    value="path/to/map/file.properties"/> 
>   *    
>   *  
>   *  
>   *  
>   * The first parameter specifies a .properties file containing pairs
> in 
>   * the form: 
>   * 
>   *  
>   *   remote-addr=remote-addr 
>   *  
>   * 
>   * The second parameter is an example of how to specify a single
> route 
>   * table entry directly in the .wsdd file. 
>   *  
>   * The first parameter allows to share the route table among several 
>   * protocols. 
>   *  
>   * The local binding address can also be specified through the
> message 
>   * context. This allows services and handlers set the local address,
> and 
>   * provide smarter routing algorithms. 
>   *  
>   * Original work from Davanum Srinivas. 
>   * 
>   * @author Davanum Srinivas ([EMAIL PROTECTED]) 
>   * @author Rodrigo Ruiz ([EMAIL PROTECTED]) 
>   * @version 1.0 
>   */ 
> public class RoutedCommonsHTTPSender extends CommonsHTTPSender {
> 
>/** 
> * serialVersionUID attribute. 
> */ 
>private static final long serialVersionUID = -8610352356067978620L;
> 
>/** 
> * MessageContext Property name for setting the local bind
> address. 
> */ 
>public static final String LOCAL_BIND_ADDRESS =
> "local.bind.address";
> 
>/** 
> * Local Bind Address Route Map. 
> */ 
>private final Map routeTable = new HashMap();
> 
>/** 
> * Flag that controls bindMap synchronization. 
> */ 
>private boolean dirty = true;
> 
>public synchronized void setOption(String name, Object value) { 
>  this.dirty = true; 
>  super.setOption(name, value); 
>}
> 
>public synchronized boolean setOptionDefault(String name, 
> Object value) { 
>  this.dirty = true; 
>  return super.setOptionDefault(name, value); 
>}
> 
>public synchronized void setOptions(Hashtable options) { 
>  this.dirty = true; 
>  super.setOptions(options); 
>}
> 
>protected HostConfiguration getHostConfiguration(HttpClient
> client, 
>MessageContext context, URL targetURL) {
> 
>  HostConfiguration config = super.getHostConfiguration(client, 
>context, 
>targetURL);
> 
>  if (targetURL != null) { 
>String remoteHost = targetURL.getHost(); 
>InetAddress localAddr = getRouteFor(context, remoteHost); 
>if (localAddr != null) { 
>  config.setLocalAddress(localAddr); 
>} 
>  }
> 
>  return config; 
>}
> 
>/** 
> * This utility method allows to force the route table to be
> rebuilt. 
> * It can be useful if the route table file is modified, and we
> can 
> * manage to get the instance of this handler. 
> */ 
>public void rebuildTable() { 
>  this.dirty = true; 
>}
> 
>/** 
> * Gets a route for the specified remote address, allowing it to
> be 
> * specified through a Message Context parameter. 
> * 
> * @param ctx   The 

RE: HELLLLLLLLLLLPPPPPPP

2006-05-17 Thread James Clinton
Hope this helps...

/// MSG ///






  








/// PORT TYPE 









/// BINDINGS 

















-Original Message-
From: Amitesh Pandya [mailto:[EMAIL PROTECTED] 
Sent: 17 May 2006 08:28
To: axis-user@ws.apache.org
Subject: HELLLPPP


Come on ! I can't believe no one has got this error???

I know you've got the answer. Please let me know

Here is the problem Again.

Hi,
I'm currently working on project and we are using Axis2 + Sandesha2
(Both Version 1.0) for the WS-RM.

One of my requirements is to return a SOAP Fault after the validation
fails.

I've created the service using WSDL2Java. The service works fine. But
when I try to throw an exception (Axis Fault) from the generated
"Skeleton" I get another Axis exception.

I looked into it and it seems to be a problem with the AXIOM. The real
problem happens when I try to call

inMessage.getEnvelope().getHeader()

Actually this method is called in the "AxisEngine" which is causing all
the troubles.

Please let me know if this is the known problem or If I'm missing
something.

Kindly suggest what is the best way of sending the Custom SOAP Fault.

Your response to this query is greatly appreciated.

Thanks in advance
Amitesh

Please find the attached Stacktrace:

##

[16/05/06 11:22:49:505 BST] 0035 SystemErr R
org.apache.axiom.om.OMException
   at
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementIm
pl.java:265)
   at
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChil
drenQNameIterator.java(Compiled
Code))
   at
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElem
entImpl.java:222)
   at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeI
mpl.java:76)
   at
uk.gov.cjse.schemas.DeliverPortMessageReceiverInOnly.invokeBusinessLogic
(DeliverPortMessageReceiverInOnly.java:102)
   at
org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInM
essageReceiver.java:34)
   at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
   at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques
t(HTTPTransportUtils.java:284)
   at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
   at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:1212)
   at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrap
per.java:629)
   at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
   at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
   at
com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
   at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:168
1)
   at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:7
7)
   at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscriminatio
n(HttpInboundLink.java:421)
   at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformatio
n(HttpInboundLink.java:367)
   at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLi
nk.java:276)
   at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscr
iminaters(NewConnectionInitialReadCallback.java:201)
   at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(Ne
wConnectionInitialReadCallback.java:103)
   at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueMa
nager.java:548)
   at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.
java:601)
   at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.
java:934)
   at
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager
.java:1021)
   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)


-
THE INFORMATION IN THIS E-MAIL AND IN ANY ATTACHMENTS IS CONFIDENTIAL

AND MAY BE PRIVILEGED OR OTHERWISE PROTECTED FROM DISCLOSURE. 
IF YOU ARE NOT THE INTENDED RECIPIENT AND HAVE RECEIVED IT IN ERROR YOU ARE ON 
NOTICE OF I

Re: Spring Support commited

2006-05-17 Thread Christian Dupuis
Hi all,

nice to see that the Spring integration topic has been kicked up
by the Axis team. I have a couple of comments regarding the code
that has been commited:

- I don't see why you introduced the ApplicationContextHolder with a
  static reference to the Spring ApplicationContext. There is another
  way to get the ApplicationContext that you should consider, because
  with that non invasive approach there is no need to configure a
  proprietary Axis2 ApplicationContextHolder in the Spring config.

  When using Spring's ContextLoader(Servlet|Listener) the ApplicationContext
  is exposed in the ServletContext. And the ServletContext itself is
  exposed in Axis2's MessageContext properties. Using that approach the
  SpringAbstractMessageReceiver's makeNewServiceObject can be changed to

 ServletContext oServletContext = (ServletContext) msgContext.getOptions().
getProperty(Constants.SERVLET_CONTEXT);
 ApplicationContext aCtx =
WebApplicationContextUtils.getWebApplicationContext(oServletContext);

   and the ApplicationContextHolder class can be removed.

- I'm not quite sure if the choosen approach to integrate Spring with
  Axis2 on the server-side is the best. Basically that is because invoking
  Spring beans as a pojo service implementations now becomes a concern for the
  Receiver implementation. With the current Receiver architecture (which needs
  refactoring btw.) you end up implementing different message receivers for
  "plain" Axis2 and for the integration with Spring (as you did with RawXML
  and RPC) which are bascially copies of each other in order to integrate
  different data binding frameworks.

  IMHO there are two possible solutions for that: You can refactor the
  receiver stuff incl. Axis2's core receivers to provide better extension
  points (template methods to invoke business logic). Or you can choose a
  different approach to integrate Spring which is not aware of actual message
  receiving.

  The last approach can be implemented by providing a superclass for Axis2
  pojo based service objects. That superclass can access the Spring
  ApplicationContext and provide the required business logic Spring bean to
  invoke. That is quite similiar to Spring's JAX-RPC (based on Axis 1.x)
  integration; look into ServletEndpointSupport.
  calling business logic)

If there is anything I can do further clarify the above, please let me know.

Cheers
Christian

-
Spring IDE
http://springide.org


Using Axis for WSDL parsing and SOAP Message generation

2006-05-17 Thread Reto Mayer

Hello,

I am new to Axis and didn't find anything about this in the docs, so 
here it goes. I am trying to use Axis for two things:


1) I want to read already-existing WSDL to find out about the structure 
of (XML Schema-based) message parts. I am imagining an API which would 
allow me to "walk" the WSDL operations, messages, parts, and data types. 
All of this, however, without generating any Java code with WSDL2Java, 
but on the fly. Axis does this inside WSDL2Java - is there some simple 
example for this / is this a use case for Axis at all? I tried reading 
the WSDL2Java code but got lost and confused.


2) I want to generate SOAP messages based on "literal" XML Elements. The 
XML elements are valid according to an XML Schema and have the data 
types required for message parts of WSDL (either basic or complex). What 
I'm trying to do is read the WSDL, specify a binding and message from 
that WSDL, and have Axis serialize (not send) the message with my XML 
elements to whatever binding/encoding is selected in the 
wsdl-binding/operation. Is this possible? How? Could anyone post a code 
example?


Could anyone point me into the right direction? Thanks!

Reto


Re: passing XML document as input parameter

2006-05-17 Thread Xinjun Chen
all the tags will be changed to ">" and "<", right?
 
Regards, 
Xinjun 
On 5/17/06, Suavi Ali Demir <[EMAIL PROTECTED]> wrote:


Why can you not embed xml inside xml?
Regards,
Ali
Xinjun Chen <[EMAIL PROTECTED]>
 wrote:



As far as I know, I cannot embed XML inside XML, so how can I pass an XML document as an input parameter to a web service?
Could anyone provide some pointer on that? 
 
Regards, 
Xinjun


Re: passing XML document as input parameter

2006-05-17 Thread Dies Koper

Hello Xinjun,

Just use a String type field.
Axis will replace the '<'s and '>'s in your XML with '<'s resp. 
'>'s, making it valid XML content.


Regards,
Dies


Suavi Ali Demir wrote:

Why can you not embed xml inside xml?
  Regards,
  Ali

Xinjun Chen <[EMAIL PROTECTED]> wrote:
As far as I know, I cannot embed XML inside XML, so how can I pass an XML 
document as an input parameter to a web service?
  Could anyone provide some pointer on that? 
   
  Regards, 
  Xinjun





Re: passing XML document as input parameter

2006-05-17 Thread Suavi Ali Demir
Why can you not embed xml inside xml?  Regards,  AliXinjun Chen <[EMAIL PROTECTED]> wrote:As far as I know, I cannot embed XML inside XML, so how can I pass an XML document as an input parameter to a web service?  Could anyone provide some pointer on that?      Regards,   Xinjun

passing XML document as input parameter

2006-05-17 Thread Xinjun Chen
As far as I know, I cannot embed XML inside XML, so how can I pass an XML document as an input parameter to a web service?
Could anyone provide some pointer on that? 
 
Regards, 
Xinjun


HELLLLLLLLLLLPPPPPPP

2006-05-17 Thread Amitesh Pandya

Come on ! I can't believe no one has got this error???

I know you've got the answer. Please let me know

Here is the problem Again.

Hi,
I'm currently working on project and we are using Axis2 + Sandesha2
(Both Version 1.0) for the WS-RM.

One of my requirements is to return a SOAP Fault after the validation fails.

I've created the service using WSDL2Java. The service works fine.
But when I try to throw an exception (Axis Fault) from the generated
"Skeleton" I get another Axis exception.

I looked into it and it seems to be a problem with the AXIOM.
The real problem happens when I try to call

inMessage.getEnvelope().getHeader()

Actually this method is called in the "AxisEngine" which is causing
all the troubles.

Please let me know if this is the known problem or If I'm missing something.

Kindly suggest what is the best way of sending the Custom SOAP Fault.

Your response to this query is greatly appreciated.

Thanks in advance
Amitesh

Please find the attached Stacktrace:

##

[16/05/06 11:22:49:505 BST] 0035 SystemErr R
org.apache.axiom.om.OMException
  at 
org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265)
  at 
org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java(Compiled
Code))
  at 
org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222)
  at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76)
  at 
uk.gov.cjse.schemas.DeliverPortMessageReceiverInOnly.invokeBusinessLogic(DeliverPortMessageReceiverInOnly.java:102)
  at 
org.apache.axis2.receivers.AbstractInMessageReceiver.receive(AbstractInMessageReceiver.java:34)
  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:454)
  at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:284)
  at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
  at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
  at 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
  at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
  at 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
  at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
  at 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
  at 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
  at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
  at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
  at 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:276)
  at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:201)
  at 
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:103)
  at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
  at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
  at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
  at 
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
  at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)