Re: [Axis2][0.95] How can my service make call to another service? (More details)

2006-04-25 Thread Ali Sadik Kumlali
Thanks Deepal. I'll try it with 1.0 RC3 and let you know the result.

Best regards,

Ali Sadik Kumlali

--- Deepal Jayasinghe <[EMAIL PROTECTED]> wrote:

> You can have this with Axis2 RC or above :)
> 
> You have to follow the following procedure for doing this
>   - When you creating stub , it has a constructor which take
> configuration context as argument.
>   - So pass that as "ListenerManager.defaultConfigurationContext"
>   - In this case client will be created using server configuration
> context
>   - And this will work in axis2 war distribution out of the box
> 
> Note : In the case of AxisServlet , it will create a ListenerManager
> and
> will set defaultConfigurationContext as the server configuration
> context.
> 
> If you are using some other thing say simpleHTTPServer then you have
> to
> do the following procedure.
>- Create a ConfigurationConetx using some axis2.xml and that
> axis2.xml can have all the transport listeners that you want
>- Then create a ListenerManager
>- and  call startSystem
>- and finally
>   ListenerManager.defaultConfigurationContext=
> configurationcotext;
> 
> Ali Sadik Kumlali wrote:
> 
> >Hi all,
> >
> >Since there is no response yet, I assume that my posting had a lack
> of
> >information :)
> >
> >Here is my scenario:
> >1) I have serviceA.wsdl and serviceB.wsdl. 
> >2) I generate skeletons and stubs with WSDL2Java
> >3) I have serviceA.aar which has serviceB.wsdl's stub
> >4) When I call serviceB's stub from a class found in serviceA.aar,
> my
> >soap message does not have addressing and security headers.
> >5) When I explicitly pass a repository location to constructor of
> >serviceB's stub, it fails saying double initialization of addressing
> >and security modules.
> >6) It cannot find the modules and gives me error when I try to
> engage
> >the addressing and security modules by following code: 
> >  stubB._getServiceClient().engageModule(new QName("addressing"));
> >  stubB._getServiceClient().engageModule(new QName("security"));
> >
> >Thanks again.
> >
> >Ali Sadik Kumlali
> >
> >
> >--- Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
> >
> >  
> >
> >>Hi all,
> >>
> >>I need my service to call another service. But, it somehow cannot
> see
> >>modules and thus doesn't add security/addressing headers.
> >>
> >>I tried engaging the modules manually as in test client. But, it
> >>couldn't find the modules.
> >>
> >>Any help would be appreciated.
> >>
> >>Thanks,
> >>
> >>Ali Sadik Kumlali
> >>
> >>__
> >>Do You Yahoo!?
> >>Tired of spam?  Yahoo! Mail has the best spam protection around 
> >>http://mail.yahoo.com 
> >>
> >>
> >>
> >
> >
> >__
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam protection around 
> >http://mail.yahoo.com 
> >
> >
> >  
> >
> 
> -- 
> Thanks,
> Deepal
> 
> ~Future is Open~ 
> 
> 
> 


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


Re: Sending my own Object Types via AXIS-SOAP engin

2006-04-25 Thread Shantha Kumar

[EMAIL PROTECTED] wrote:


Hi All,

Can someone please advice me how I can send my own object type, i.e. I
have an object called AccidentRecords, I want to send these accident
records held in an Array of AccidentRecordsArray as a SOAP response to my
service call : sendAccidents ???

I'll appreciate any avice.

Thanx

yasmin



 



Look at the bean mapping and arraymapping in the axis guide. this should 
help you


thanks
SK


Re: [Axis2][0.95] How can my service make call to another service? (More details)

2006-04-25 Thread Deepal Jayasinghe
You can have this with Axis2 RC or above :)

You have to follow the following procedure for doing this
  - When you creating stub , it has a constructor which take
configuration context as argument.
  - So pass that as "ListenerManager.defaultConfigurationContext"
  - In this case client will be created using server configuration context
  - And this will work in axis2 war distribution out of the box

Note : In the case of AxisServlet , it will create a ListenerManager and
will set defaultConfigurationContext as the server configuration context.

If you are using some other thing say simpleHTTPServer then you have to
do the following procedure.
   - Create a ConfigurationConetx using some axis2.xml and that
axis2.xml can have all the transport listeners that you want
   - Then create a ListenerManager
   - and  call startSystem
   - and finally
  ListenerManager.defaultConfigurationContext= configurationcotext;

Ali Sadik Kumlali wrote:

>Hi all,
>
>Since there is no response yet, I assume that my posting had a lack of
>information :)
>
>Here is my scenario:
>1) I have serviceA.wsdl and serviceB.wsdl. 
>2) I generate skeletons and stubs with WSDL2Java
>3) I have serviceA.aar which has serviceB.wsdl's stub
>4) When I call serviceB's stub from a class found in serviceA.aar, my
>soap message does not have addressing and security headers.
>5) When I explicitly pass a repository location to constructor of
>serviceB's stub, it fails saying double initialization of addressing
>and security modules.
>6) It cannot find the modules and gives me error when I try to engage
>the addressing and security modules by following code: 
>  stubB._getServiceClient().engageModule(new QName("addressing"));
>  stubB._getServiceClient().engageModule(new QName("security"));
>
>Thanks again.
>
>Ali Sadik Kumlali
>
>
>--- Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
>
>  
>
>>Hi all,
>>
>>I need my service to call another service. But, it somehow cannot see
>>modules and thus doesn't add security/addressing headers.
>>
>>I tried engaging the modules manually as in test client. But, it
>>couldn't find the modules.
>>
>>Any help would be appreciated.
>>
>>Thanks,
>>
>>Ali Sadik Kumlali
>>
>>__
>>Do You Yahoo!?
>>Tired of spam?  Yahoo! Mail has the best spam protection around 
>>http://mail.yahoo.com 
>>
>>
>>
>
>
>__
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>
>  
>

-- 
Thanks,
Deepal

~Future is Open~ 




Re: does axis2 always mangle the wsdl file

2006-04-25 Thread Deepal Jayasinghe
Hi Cleve
pls see my comments below

Cleve OpenSource wrote:

>
> Now, my understanding is that if you place your wsdl file in the
> META-INF file of the web service's aar file, that is the wsdl file
> that will be delivered back to the client when you traverse to
> http://my.endpoint.com/service?wsdl.

What will happen is AxisService will be created using that wsdl , I mean
operation and their soapAction will be created using that , in the mean
while AxisService will keep the original schemas as well. So when you
ask for the wsdl at the runtime AxisService will be serialize with new
binding.

>
> However...
>
> in the binding portion of the wsdl file, version 1.1:
>
> 1) if no attribute namespace is provided for the operation element,
> axis2 will add the attribute: namespace="http://org.apache.axis2";
>
> 2) if you specify your own namespace, axis2 will replace it with the
> attribute: namespace="http://org.apache.axis2";
>
You can give your own schema targetNamespace as follows in ur
services.xml, so if you override schema target namespace then you will
get what you want
http://myNamespase.com";>

> is this the correct behaviour.  i have never been able to present a
> wsdl file back to the client that did not have this namespace.  just
> curious as to why?
>
> is there a way to switch it off? completely!
>
> here's what i mean...
>
> 
> 
>
> http://org.apache.axis2/"/>
> 
>
> http://org.apache.axis2/"/>
> 
> 
>
>

-- 
Thanks,
Deepal

~Future is Open~ 




Axis2 1.0 RC3 release

2006-04-25 Thread Deepal Jayasinghe
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
Hi all,


I uploaded Axis2 1.0 RC3 release artifacts. Please help us by
downloading and reviewing them.

Download locations :
* binary and source distributions -
http://people.apache.org/~deepal/axis2/1.0-RC3/

* jars
http://people.apache.org/~deepal/maven/ws/axis2/jars/

* mars (addressing and security)
http://people.apache.org/~deepal/maven/ws/axis2/mars/


According to the release plan, I'm expecting to release Axis2 1.0 on
1st May, 2006.

Please note that these releases do not include xdocs but will be
available with 1.0 release as usual.

Thanks,
 Deepal

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
iD8DBQFETvA7jOGcXNDx0CARAh30AKChsFhVcrRvOk99sPBXqC1NwQgVmACaAsZ6
9/tIb5LpEe0YDpBJTp3fRd4=
=DEO7
-END PGP SIGNATURE-




RE: got security module installation problems :(

2006-04-25 Thread GOBE HOBONA
There seems to be a problem with the wss4j jar file inside the 
security-0.95.mar file conflicting with the wss4j-SNAPHOT inside the WEB-INF 
folder.


To enable the security module to work, this is what I did:

1) Install all the jar files from the axis2-std-0.95-bin/samples/security 
into the WEB-INF/lib. SEE FOOTNOTE FOR LIST

2)Remove wss4j-SNAPSHOT.jar from WEB-INF/lib.
3)Then add xalan.jar to WEB-INF/lib   (using version 2.6.0 on JDK1.5)



4) If you wish to test the security module using the SecureService sample 
check out the message from

http://mail-archives.apache.org/mod_mbox/ws-axis-user/200603.mbox/[EMAIL 
PROTECTED]


Service.xml has this error urn:echo   Notice 
the endtag is erroneous.




FOOTNOTE:
axis2-std-0.95-bin.zip is the binary distribution from main Axis2 website
If you test the servicelister after step 2, you will get a message about a 
missing FuncLoader class. That's when you can add xalan.jar to your 
WEB-INF/lib folder.


Jar files in security sample folder include

  bcprov-jdk13-131.jar
  commons-discovery-0.2.jar
  secUtil.jar
  xmlsec-1.2.1.jar
  wss4j-SNAPSHOT.jar

Cheers,

Gobe Hobona




Re: [axis2] Setting EndPoint in Module -> nullpointer

2006-04-25 Thread robert lazarski
The point being
you need to make sure you can call setTO() by knowing what phase your
in. AbstractHandler.invoke() will be called by all phases if indeed you
are following the loggging.mar code. 

What I showed is a solution
for getting an EPR without NPE by calling the right phase. You're
setting the EPR, however ;-) . I think I get what you are trying to do
now. 

The logging.mar
is an example that places phases after the system predefined phases, 
yet an EPR is AFAIK expected to be set before the user phases, due to
that AxisEngine is called before the user phases and the EPR's are
initialized for the MessageContext methods such as getTO() .   

My two reccomendations are: 

1) Use RC2. If you end up filing a Jira that's the best code base to do it from . 
2) Look at the Transport and Dispatch phases to see if you can actually set the EPR after those phases. 

HTH,
Robert
http://www.braziloutsource.com
On 4/25/06, Thomas Van de Velde <
[EMAIL PROTECTED]> wrote:
Hi Robert,I am not sure how this
is related to my problem. The idea is to defer the definition of an EPR
at the end of the processing pipeline and not in the client code.Thomas

On 4/25/06, robert lazarski <[EMAIL PROTECTED]> wrote:


Incidently, I'm not sure what one would do here on: 

else if (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW)

As I don't see how to get the EPR in this case. That might not be a valid case though. 

Robert
http://www.braziloutsource.com/
On 4/25/06, robert lazarski <
[EMAIL PROTECTED]> wrote:You need to be able to determine how to get the endpoint via the Flows, such as: 


EndpointReference ref = null;

    // Get id, type and content
    Long    id;
    Integer type;
    // 'soap request' must be called first
    if (messageContext.getFLOW() == MessageContext.IN_FLOW) {
    // show soap message inside the 'soap request' pane in the applet
    id = assignMessageId(messageContext);
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_REQUEST);
    ref = messageContext.getTo();
    } else if (messageContext.getFLOW() == MessageContext.OUT_FLOW) {
    id = getMessageId(messageContext);
    // show soap message inside the 'soap response' pane in the applet
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_RESPONSE);
    ref = messageContext.getFrom();
    } else if (messageContext.getFLOW() == MessageContext.IN_FAULT_FLOW) {
    id = getMessageId(messageContext);
    // show soap message inside the 'soap response' pane in the applet
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_RESPONSE);
    ref = messageContext.getFaultTo();
    } else {
    throw new
IllegalStateException("unknown FLOW detected in messageContext: " +
messageContext.getFLOW());
    }

Another way to do this would be labels. 

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


On 4/25/06, 

Thomas Van de Velde <

[EMAIL PROTECTED]> wrote:Hello,I am trying to set the
endpointreference in a module so that the client code does not need to
be aware of the endpoint details.  The goal is that  this
module takes over responsibility of  setting the endpoint.  When taking out options.setTo(...) from the client, I get an
error indicating that the transport cannot be determined.("Cannot infer
transport information from the URL information provided")  I've
fixed this by setting the TransportIn and TransportOut options. 
Now Axis is able to determine the transport details.  However I am
getting now getting a nullpointer exception in AxisEngine.send() line
544.I am using axis2 v0.95Client options:            Options options = new Options();            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);            
options.setTranportOut(new TransportOutDescription(new QName(                    Constants.TRANSPORT_HTTP)));            options.setUseSeparateListener(false);Handler code:public void invoke(MessageContext msgContext) throws AxisFault {
    public static EndpointReference EPR = new EndpointReference(            "




http://localhost:8080/axis2/services/sample-provider");
        msgContext.setTo(EPR);        log.info(msgContext.getEnvelope().toString());    }All the rest of the configuration (axis2.xml and module.xml) is identical to the LoggingModule sample.I guess this should be raised as a JIRA issue.  Anything I can do to get past the nullpointer?
Cheers,Thomas 










Re: [axis2] Setting EndPoint in Module -> nullpointer

2006-04-25 Thread Thomas Van de Velde
Hi Robert,I am not sure how this is related to my problem. The idea is to defer the definition of an EPR at the end of the processing pipeline and not in the client code.Thomas
On 4/25/06, robert lazarski <[EMAIL PROTECTED]> wrote:
Incidently, I'm not sure what one would do here on: 

else if (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW)

As I don't see how to get the EPR in this case. That might not be a valid case though. 

Robert
http://www.braziloutsource.com/
On 4/25/06, robert lazarski <
[EMAIL PROTECTED]> wrote:You need to be able to determine how to get the endpoint via the Flows, such as: 


EndpointReference ref = null;

    // Get id, type and content
    Long    id;
    Integer type;
    // 'soap request' must be called first
    if (messageContext.getFLOW() == MessageContext.IN_FLOW) {
    // show soap message inside the 'soap request' pane in the applet
    id = assignMessageId(messageContext);
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_REQUEST);
    ref = messageContext.getTo();
    } else if (messageContext.getFLOW() == MessageContext.OUT_FLOW) {
    id = getMessageId(messageContext);
    // show soap message inside the 'soap response' pane in the applet
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_RESPONSE);
    ref = messageContext.getFrom();
    } else if (messageContext.getFLOW() == MessageContext.IN_FAULT_FLOW) {
    id = getMessageId(messageContext);
    // show soap message inside the 'soap response' pane in the applet
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_RESPONSE);
    ref = messageContext.getFaultTo();
    } else {
    throw new
IllegalStateException("unknown FLOW detected in messageContext: " +
messageContext.getFLOW());
    }

Another way to do this would be labels. 

HTH,
Robert
http://www.braziloutsource.com/
On 4/25/06, Thomas Van de Velde <

[EMAIL PROTECTED]> wrote:Hello,I am trying to set the
endpointreference in a module so that the client code does not need to
be aware of the endpoint details.  The goal is that  this
module takes over responsibility of  setting the endpoint.  When taking out options.setTo(...) from the client, I get an
error indicating that the transport cannot be determined.("Cannot infer
transport information from the URL information provided")  I've
fixed this by setting the TransportIn and TransportOut options. 
Now Axis is able to determine the transport details.  However I am
getting now getting a nullpointer exception in AxisEngine.send() line
544.I am using axis2 v0.95Client options:            Options options = new Options();            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);            
options.setTranportOut(new TransportOutDescription(new QName(                    Constants.TRANSPORT_HTTP)));            options.setUseSeparateListener(false);Handler code:public void invoke(MessageContext msgContext) throws AxisFault {
    public static EndpointReference EPR = new EndpointReference(            "


http://localhost:8080/axis2/services/sample-provider");
        msgContext.setTo(EPR);        log.info(msgContext.getEnvelope().toString());    }All the rest of the configuration (axis2.xml and module.xml) is identical to the LoggingModule sample.I guess this should be raised as a JIRA issue.  Anything I can do to get past the nullpointer?
Cheers,Thomas 








Re: [axis2] Setting EndPoint in Module -> nullpointer

2006-04-25 Thread Thomas Van de Velde
Hi,The point is that I do not want to set an EPR in the client but defer that decision until later in the handler chain.That way I could write a dynamic addressing handler.Thomas
On 4/25/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
Hi Thomas,You don't need to call setTranportOut, if your toEPR says it over HTTP.Anyway, please create a JIRA on this and if possible please explain away to re-produce this. You might want to attach some code you have
already written :).-- ChinthakaThomas Van de Velde wrote:> Hello,>> I am trying to set the endpointreference in a module so that the client> code does not need to be aware of the endpoint details.  The goal is
> that  this module takes over responsibility of  setting the endpoint.>> When taking out options.setTo(...) from the client, I get an error> indicating that the transport cannot be determined.("Cannot infer
> transport information from the URL information provided")  I've fixed> this by setting the TransportIn and TransportOut options.  Now Axis is> able to determine the transport details.  However I am getting now
> getting a nullpointer exception in AxisEngine.send() line 544.>> I am using axis2 v0.95>> Client options:>> Options options = new Options();> 
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);> options.setTranportOut(new TransportOutDescription(new QName(> Constants.TRANSPORT_HTTP)));> options.setUseSeparateListener
(false);>> Handler code:>> public void invoke(MessageContext msgContext) throws AxisFault {> public static EndpointReference EPR = new EndpointReference(> "
http://localhost:8080/axis2/services/sample-provider");> msgContext.setTo(EPR);> log.info(msgContext.getEnvelope().toString());> }>> All the rest of the configuration (
axis2.xml and module.xml) is> identical to the LoggingModule sample.>> I guess this should be raised as a JIRA issue.  Anything I can do to get> past the nullpointer?>> Cheers,
> Thomas


Re: [Axis2] OMElement question

2006-04-25 Thread Dennis Sosnoski
You basically need an interface layer between the JAXB objects and the 
Axis2 code. This interface code can potentially be generated for you 
using the WSDL2Java tool provided by Axis2, but doing this requires a 
JAXB extension for WSDL2Java. This doesn't currently exist, so you'd 
need to do the conversions yourself, and Ajith is suggesting that you 
look at how the code generated for other data binding frameworks is 
structured so you can understand what needs to be done.


I'm planning to add JAXB 2.0 support within the next month or so. It 
should be reasonably easy at this point, since the JAXB issues are very 
similar to those I've dealt with for JiBX data binding. I believe there 
are license issues which will prevent this actually becoming part of the 
Axis2 project, but I'm sure we'll link it from the Axis2 site once the 
JAXB add-on is available.


 - Dennis

Dennis M. Sosnoski
SOA, Web Services, and XML
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117



Michele Mazzucco wrote:


Hi Ajith,

I'm sorry, but can you be more clear, please? Could you show me a
practical example?

Thanks,
Michele

Ajith Ranabahu wrote:
 


Hi,
yes this is possible :) Axis2 explicitly allows any databinding to be
plugged in and infact if you codegen for different frameworks like
xmlbeans/adb/jaxme you'll see how  the codegenerator generates the
skeletons referring to the generated databinding classes.

if you are doing it by hand then you'll have to write your custom
message receiver and write the fromOM and toOM conversion methods as
well (the implementation of these methods are dependent on the
databinding framework)
My guess is the best choice for you would be to run the codegen with
XMLbeans and look at the generated code. You can then replace the
necessary classes and rewrite the conversion methods.


On 4/25/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
   


Hi all,

starting from an xml schema, I generate Java classes with JAXB. Now the
question is, can I use those objects as return type or method
argument(s) of my web service methods or I must use exclusively
OMElement objects?

i.e.

say, for an in-out operation, I generate two classes from the xml
schema, RequestObject and ReplyObject. Which of the two options is the
correct one?,

// web service method
ReplyObject fooMethod(RequestObject arg) {
   ...
}

or

OMElement fooMethod(OMElement arg) {
   ...
}

Thanks,
Michele

 


--
Ajith Ranabahu
   



 



[axis2 vRC2] Service Impl hangs when turning caching on

2006-04-25 Thread Wes Caldwell
I have a service implementation that returns an OMElement.  My
typical results returned are rather large xml payloads, therefore I am
trying to optimize my memory usage on the server-side.  In my service impl,
I am getting the resulting xml payload as a ByteArrayInputStream, and using
the StAXOMBuilder to then construct the OMElement for me, to be returned.
Another point of memory optimization is to not have the StAXOMBuilder build
the complete OMElement in memory, saving myself some significant memory on
large xml results.  So I am doing something like this:


// bais is the ByteArrayInputStream containing the xml result
StAXOMBuilder builder = new StAXOMBuilder(bais);
// Turn off caching to save some memory
builder.setCache(false);
OMElement response = builder.getDocumentElement();


The problem is that this code will completely hang the server on the
builder.getDocumentElement() line.  If I change the line above that to
builder.setCache(true), which is also the default, then it does not hang,
but I see significant memory used by the full creation of the OMElement
container.  My question is, shouldn't the setCache(false) not hang the
server?  Additionally, is there a better way for me to achieve the same
results of not incurring a memory hit of a full OMElement creation?

Thanks in advance for any help.

Wes







Re: [Axis2][0.95] How can my service make call to another service? (More details)

2006-04-25 Thread Ali Sadik Kumlali
Hi all,

Since there is no response yet, I assume that my posting had a lack of
information :)

Here is my scenario:
1) I have serviceA.wsdl and serviceB.wsdl. 
2) I generate skeletons and stubs with WSDL2Java
3) I have serviceA.aar which has serviceB.wsdl's stub
4) When I call serviceB's stub from a class found in serviceA.aar, my
soap message does not have addressing and security headers.
5) When I explicitly pass a repository location to constructor of
serviceB's stub, it fails saying double initialization of addressing
and security modules.
6) It cannot find the modules and gives me error when I try to engage
the addressing and security modules by following code: 
  stubB._getServiceClient().engageModule(new QName("addressing"));
  stubB._getServiceClient().engageModule(new QName("security"));

Thanks again.

Ali Sadik Kumlali


--- Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> I need my service to call another service. But, it somehow cannot see
> modules and thus doesn't add security/addressing headers.
> 
> I tried engaging the modules manually as in test client. But, it
> couldn't find the modules.
> 
> Any help would be appreciated.
> 
> Thanks,
> 
> Ali Sadik Kumlali
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 


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


Re: does axis2 always mangle the wsdl file

2006-04-25 Thread Gopal Patwa


What I got information from Deepal, if you try to access wsdl from
http://my.endpoint.com/service?wsdl it will always generate new one.

But still uses the wsdl you have specified in meta-inf folder.

The workaround for this problem we had, to copy your wsdl which in meta-inf
folder also to some other location where it is accessible to client.

I had deployed same wsdl in http://localhost:8080/axis2/mywsdl.wsdl so my
client can see this wsdl

Not sure sure if it will fix in 1.0 release, I was using RC1

Hope this help

Gopal Patwa
--
View this message in context: 
http://www.nabble.com/does-axis2-always-mangle-the-wsdl-file-t1507411.html#a4089081
Sent from the Axis - User forum at Nabble.com.



does axis2 always mangle the wsdl file

2006-04-25 Thread Cleve OpenSource


Now, my understanding is that if you place your wsdl file in the 
META-INF file of the web service's aar file, that is the wsdl file that 
will be delivered back to the client when you traverse to 
http://my.endpoint.com/service?wsdl.


However...

in the binding portion of the wsdl file, version 1.1:

1) if no attribute namespace is provided for the operation element, 
axis2 will add the attribute: namespace="http://org.apache.axis2";


2) if you specify your own namespace, axis2 will replace it with the 
attribute: namespace="http://org.apache.axis2";


is this the correct behaviour.  i have never been able to present a wsdl 
file back to the client that did not have this namespace.  just curious 
as to why?


is there a way to switch it off? completely!

here's what i mean...



   
http://org.apache.axis2/"/>

   
http://org.apache.axis2/"/>




Re: [axis2] Setting EndPoint in Module -> nullpointer

2006-04-25 Thread Eran Chinthaka
Hi Thomas,

You don't need to call setTranportOut, if your toEPR says it over HTTP.

Anyway, please create a JIRA on this and if possible please explain a
way to re-produce this. You might want to attach some code you have
already written :).

-- Chinthaka


Thomas Van de Velde wrote:
> Hello,
> 
> I am trying to set the endpointreference in a module so that the client
> code does not need to be aware of the endpoint details.  The goal is
> that  this module takes over responsibility of  setting the endpoint. 
> 
> When taking out options.setTo(...) from the client, I get an error
> indicating that the transport cannot be determined.("Cannot infer
> transport information from the URL information provided")  I've fixed
> this by setting the TransportIn and TransportOut options.  Now Axis is
> able to determine the transport details.  However I am getting now
> getting a nullpointer exception in AxisEngine.send() line 544.
> 
> I am using axis2 v0.95
> 
> Client options:
> 
> Options options = new Options();
> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> options.setTranportOut(new TransportOutDescription(new QName(
> Constants.TRANSPORT_HTTP)));
> options.setUseSeparateListener(false);
> 
> Handler code:
> 
> public void invoke(MessageContext msgContext) throws AxisFault {
> public static EndpointReference EPR = new EndpointReference(
> "http://localhost:8080/axis2/services/sample-provider";);
> msgContext.setTo(EPR);
> log.info(msgContext.getEnvelope().toString());
> }
> 
> All the rest of the configuration (axis2.xml and module.xml) is
> identical to the LoggingModule sample.
> 
> I guess this should be raised as a JIRA issue.  Anything I can do to get
> past the nullpointer?
> 
> Cheers,
> Thomas




signature.asc
Description: OpenPGP digital signature


Re: WSDL2Java - I must be stupid

2006-04-25 Thread Cleve OpenSource


fair play rob.  this sorted out my problem.  thanks.

robert lazarski wrote:
Yeah, there is a trick here that's explained in the code generation 
guide ant task section.


http://ws.apache.org/axis2/0_95/CodegenToolReference.html

Add '-d' to the wsdl2java ant task - the docs need to be updated - so 
that it looks like:


 
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  
  
  
  
  
  
  

  

Now the trick is that a feature of xmlbeans is that it generates a 
single class  - which needs to be referenced .  See the 'move todir'  
part of the  task I pasted.


And that should do it. If you're still let us know.

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

On 4/24/06, *Cleve OpenSource* <[EMAIL PROTECTED] 
> wrote:



I'm having a really weird problem that i'm sure there is a simple
fix for.

Using Axis 1, everything is easy.

1) I have a WSDL file with the not too complex types section
2) I generate my classes from the WSDL file
3) deploy to a server and have a client stub connect through and test
the web service.

Using Axis2, everything is supposed to be easy, but is not.  i must be
stupid.

I keep having the same problem that Ken Campbell reports on
3/4/2006 @
14:45.  No answers were posted to the group.

http://mail-archives.apache.org/mod_mbox/ws-axis-user/200604.mbox/[EMAIL 
PROTECTED]


ClassPath problems for XMLBeans.  What is strange, is that a simple
google search finds people asking the question but with no discernible
answers coming back.

Has anyone run into this problem?

Cheers,
Cleve





_

java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java :585)
at
org.apache.axis2.XjmiBookingTest.getTestObject(XjmiBookingTest.java:261)
at
org.apache.axis2.XjmiBookingTest.testping(XjmiBookingTest.java:200)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke (Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected (TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:120)
at

org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java
:478)
at

org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at

org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ExceptionInInitializerError
at

uk.co.groundtransport.xjmi.xjmi.wsdl.booking.PingDocument$Factory.newInstance(PingDocument.java:45)
... 19 more
Caused by: java.lang.RuntimeException: Cannot load SchemaTypeSystem.
Unable to load class with name

schemaorg_apache_xmlbeans.system.s6BC58055D4FA32B2157A35DE55719CF0.TypeSystemHolder.
Make sure the generated binary files are on the classpath.
at
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(XmlBeans.java
:781)
at

uk.co.groundtransport.xjmi.xjmi.wsdl.booking.PingDocument.(PingDocument.java:20)
... 20 more
Caused by: java.lang.ClassNotFoundException:

schemaorg_apache_xmlbeans.system.s6BC58055D4FA32B2157A35DE55719CF0.TypeSystemHolder

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass (ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader
(XmlBeans.java:767)
... 21 more







FW: sendXMLDeclaration not working?

2006-04-25 Thread Doug Cottrell (Interactions)
Title: FW: sendXMLDeclaration not working?






Hello-


I have created Axis client code to call a webservice hosted on a WebLogic server.  The Axis generated SOAP XML has the line:

    

in it.  However, when the SOAP request is sent to WebLogic, WebLogic returns a SAX Exception "Processing instructions are not allowed within SOAP messages".

So we attempt to turn this off by using:

  

in the  section of the a client-config.wsdd file.  We've can verify it is reading this file, but the line we don't want is still being sent!

We are using Axis 1.3. Is sendXMLDeclaration not working, or are we doing something wrong?


Thanks

Doug





axis2 - LocalTransportSender question

2006-04-25 Thread weining Chung
Hi,
 
I am trying to use the LocalTransportSender for in-proc web service calls. Looking at the implementation of the LocalTransportSender/LocalTransportReceiver I found it serializes the object model into a byte array and then serialize it back. It seems a little bit inefficient to me since all the objects are in the same process and should be able to share. So I was wonderfing if  it is possible to directly share the object model between the client and provider? Sorry if this question sounds stupid or has been asked and answered, but I am quite new to this list.

 
Thanks!
 
Weining
 


Re: [axis2] Setting EndPoint in Module -> nullpointer

2006-04-25 Thread robert lazarski
Incidently, I'm not sure what one would do here on: 

else if (messageContext.getFLOW() == MessageContext.OUT_FAULT_FLOW)

As I don't see how to get the EPR in this case. That might not be a valid case though. 

Robert
http://www.braziloutsource.com/On 4/25/06, robert lazarski <
[EMAIL PROTECTED]> wrote:You need to be able to determine how to get the endpoint via the Flows, such as: 


EndpointReference ref = null;

    // Get id, type and content
    Long    id;
    Integer type;
    // 'soap request' must be called first
    if (messageContext.getFLOW() == MessageContext.IN_FLOW) {
    // show soap message inside the 'soap request' pane in the applet
    id = assignMessageId(messageContext);
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_REQUEST);
    ref = messageContext.getTo();
    } else if (messageContext.getFLOW() == MessageContext.OUT_FLOW) {
    id = getMessageId(messageContext);
    // show soap message inside the 'soap response' pane in the applet
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_RESPONSE);
    ref = messageContext.getFrom();
    } else if (messageContext.getFLOW() == MessageContext.IN_FAULT_FLOW) {
    id = getMessageId(messageContext);
    // show soap message inside the 'soap response' pane in the applet
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_RESPONSE);
    ref = messageContext.getFaultTo();
    } else {
    throw new
IllegalStateException("unknown FLOW detected in messageContext: " +
messageContext.getFLOW());
    }

Another way to do this would be labels. 

HTH,
Robert
http://www.braziloutsource.com/
On 4/25/06, Thomas Van de Velde <
[EMAIL PROTECTED]> wrote:Hello,I am trying to set the
endpointreference in a module so that the client code does not need to
be aware of the endpoint details.  The goal is that  this
module takes over responsibility of  setting the endpoint.  When taking out options.setTo(...) from the client, I get an
error indicating that the transport cannot be determined.("Cannot infer
transport information from the URL information provided")  I've
fixed this by setting the TransportIn and TransportOut options. 
Now Axis is able to determine the transport details.  However I am
getting now getting a nullpointer exception in AxisEngine.send() line
544.I am using axis2 v0.95Client options:            Options options = new Options();            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);            
options.setTranportOut(new TransportOutDescription(new QName(                    Constants.TRANSPORT_HTTP)));            options.setUseSeparateListener(false);Handler code:public void invoke(MessageContext msgContext) throws AxisFault {
    public static EndpointReference EPR = new EndpointReference(            "

http://localhost:8080/axis2/services/sample-provider");
        msgContext.setTo(EPR);        log.info(msgContext.getEnvelope().toString());    }All the rest of the configuration (axis2.xml and module.xml) is identical to the LoggingModule sample.I guess this should be raised as a JIRA issue.  Anything I can do to get past the nullpointer?
Cheers,Thomas 






Re: [axis2] Setting EndPoint in Module -> nullpointer

2006-04-25 Thread robert lazarski
You need to be able to determine how to get the endpoint via the Flows, such as: 

EndpointReference ref = null;

    // Get id, type and content
    Long    id;
    Integer type;
    // 'soap request' must be called first
    if (messageContext.getFLOW() == MessageContext.IN_FLOW) {
    // show soap message inside the 'soap request' pane in the applet
    id = assignMessageId(messageContext);
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_REQUEST);
    ref = messageContext.getTo();
    } else if (messageContext.getFLOW() == MessageContext.OUT_FLOW) {
    id = getMessageId(messageContext);
    // show soap message inside the 'soap response' pane in the applet
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_RESPONSE);
    ref = messageContext.getFrom();
    } else if (messageContext.getFLOW() == MessageContext.IN_FAULT_FLOW) {
    id = getMessageId(messageContext);
    // show soap message inside the 'soap response' pane in the applet
    type = new Integer(SOAPMonitorConstants.SOAP_MONITOR_RESPONSE);
    ref = messageContext.getFaultTo();
    } else {
    throw new
IllegalStateException("unknown FLOW detected in messageContext: " +
messageContext.getFLOW());
    }

Another way to do this would be labels. 

HTH,
Robert
http://www.braziloutsource.com/On 4/25/06, Thomas Van de Velde <
[EMAIL PROTECTED]> wrote:Hello,I am trying to set the
endpointreference in a module so that the client code does not need to
be aware of the endpoint details.  The goal is that  this
module takes over responsibility of  setting the endpoint.  When taking out options.setTo(...) from the client, I get an
error indicating that the transport cannot be determined.("Cannot infer
transport information from the URL information provided")  I've
fixed this by setting the TransportIn and TransportOut options. 
Now Axis is able to determine the transport details.  However I am
getting now getting a nullpointer exception in AxisEngine.send() line
544.I am using axis2 v0.95Client options:            Options options = new Options();            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);            
options.setTranportOut(new TransportOutDescription(new QName(                    Constants.TRANSPORT_HTTP)));            options.setUseSeparateListener(false);Handler code:public void invoke(MessageContext msgContext) throws AxisFault {
    public static EndpointReference EPR = new EndpointReference(            "
http://localhost:8080/axis2/services/sample-provider");
        msgContext.setTo(EPR);        log.info(msgContext.getEnvelope().toString());    }All the rest of the configuration (axis2.xml and module.xml) is identical to the LoggingModule sample.I guess this should be raised as a JIRA issue.  Anything I can do to get past the nullpointer?
Cheers,Thomas 




[axis2] Setting EndPoint in Module -> nullpointer

2006-04-25 Thread Thomas Van de Velde
Hello,I am trying to set the endpointreference in a module so that the client code does not need to be aware of the endpoint details.  The goal is that  this module takes over responsibility of  setting the endpoint.  
When taking out options.setTo(...) from the client, I get an error indicating that the transport cannot be determined.("Cannot infer transport information from the URL information provided")  I've fixed this by setting the TransportIn and TransportOut options.  Now Axis is able to determine the transport details.  However I am getting now getting a nullpointer exception in 
AxisEngine.send() line 544.I am using axis2 v0.95Client options:            Options options = new Options();            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);            
options.setTranportOut(new TransportOutDescription(new QName(                    Constants.TRANSPORT_HTTP)));            options.setUseSeparateListener(false);Handler code:public void invoke(MessageContext msgContext) throws AxisFault {
    public static EndpointReference EPR = new EndpointReference(            "http://localhost:8080/axis2/services/sample-provider");
        msgContext.setTo(EPR);        log.info(msgContext.getEnvelope().toString());    }All the rest of the configuration (axis2.xml and module.xml) is identical to the LoggingModule sample.I guess this should be raised as a JIRA issue.  Anything I can do to get past the nullpointer?
Cheers,Thomas 


User manual for Axis2 v 0.95 - Problems with "Invoking a service using a mail"

2006-04-25 Thread Jack
Hi,

I'm having real trouble setting up a working example of SOAP over SMTP
- I've looked at the user guide but the example seems broken (see
below).

Does anyone have a working example of this or any pointers? Would be
muchly appreciated.


Some specific issues for example:

For example in Section 2. in the code you have:
   ConfigurationContext configContextbuilder
   .buildConfigurationContext(file.getAbsolutePath());

This is not even valid java and should probably read something like:
   ConfigurationContext configContext  =
   builder.buildConfigurationContext(file.getAbsolutePath());

Also the UtilsMailServer that is mentioned cannot be found anywhere
(in the src or bin or doc distributions)?

Is it possible that this section of the user guide is revised and if
so please make the source code for this section available somewhere as
a zip / jar / other (or better still include it in the samples with
the bin or src distributions).

Cheers
Jack...

The claim "natural" is not synonymous with safe.


Retrieve Port Number

2006-04-25 Thread Daniel Destro
This is a little off-topic.I am using a ServletContextListener to register my WSDD automatically when the web context is created.But I have to configure the host:port of the server to be able to register it. As I don´t want to have to inform the host and port number, to avoid problems when deploying the same EAR/WAR at any other app server, I would like to retrieve the port number used at runtime.
I am currently using JBoss 3.2.3.Does anyone have any idea on how to discover the port number used by JBoss/Tomcat?Thanks


deploying a wsdd in a custom location

2006-04-25 Thread Arnaud Weber

hi,

I'm trying to use axis in another location than 
//localhost:8080/axis/... but when i'm launching the command
java AXIS_LIBS org.apache.axis.client.AdminClient deploy.wsdd, i get the 
error 404 faultString: (404)/axis/services/AdminService


i'm sure it's easy but i can't get anything on it and i'm sure i'm not 
alone to have this problem...



thanks
Arnaud


Re: Trouble running axis2 examples

2006-04-25 Thread Matt L
I've not yet resolved this problem. However, I looked through the
catalina.out logfile. When I restart tomcat, the logfile says this:

Apr 25, 2006 6:45:21 AM org.apache.coyote.http11.Http11BaseProtocol
pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Apr 25, 2006 6:45:22 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Apr 25, 2006 6:45:23 AM org.apache.coyote.http11.Http11BaseProtocol
destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Apr 25, 2006 6:45:23 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: Failed shutdown of Apache Portable Runtime
Exception in thread "Thread-1" java.lang.NullPointerException
at

org.apache.axis2.transport.jms.JMSSender.closeAllConnectors(JMSSender.java:77)
at
org.apache.axis2.transport.jms.JMSSender$1.run(JMSSender.java:60)
Apr 25, 2006 6:45:23 AM org.apache.catalina.core.AprLifecycleListener
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance
in production environments was not found on the java.library.path:
/usr/lib/jdk1.5.0_06/jre/lib/i386/client:/usr/lib/jdk1.5.0_06/jre/lib/i386:/usr/lib/jdk1.5.0_06/jre/../lib/i386
Apr 25, 2006 6:45:23 AM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Apr 25, 2006 6:45:23 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1442 ms
Apr 25, 2006 6:45:23 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 25, 2006 6:45:23 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.16
Apr 25, 2006 6:45:23 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Apr 25, 2006 6:45:24 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive axis2.war
Apr 25, 2006 6:45:24 AM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(/usr/local/webservices/apache-tomcat-5.5.16/webapps/axis2/WEB-INF/lib/servletapi-2.3.jar)
- jar not loaded. See Servlet Spec 2.3, section9.7.2. Offending class:
javax/servlet/Servlet.class
- Deploying module : addressing-0.95
- Error in schema generating GroovyRcv.groovy
java.lang.ClassNotFoundException: GroovyRcv.groovy
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at

org.apache.axis2.deployment.DeploymentClassLoader.findClass(DeploymentClassLoader.java:123)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at

org.apache.axis2.wsdl.builder.SchemaGenerator.(SchemaGenerator.java:89)
at
org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:165)
at

org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:78)
at

org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:86)
at

org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:128)
at

org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:428)
at

org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:195)
at

org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:195)
at

org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:145)
at

org.apache.axis2.deployment.DeploymentEngine.load(DeploymentEngine.java:571)
at

org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:59)
at

org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:33)
at

org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:82)
at

org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:237)
at
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:204)
at

org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at

org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
at

org.apache.catalina.core.StandardContext.start(StandardContext.java:4197)
at

org.apache.catalina.core.Con

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

2006-04-25 Thread Carsten Schmidt
Hi everybody,
maybe this question has already been answered a thousend times, but I
haven't found anything about it.
I got a server with a few different network adapters. Each of them with
a different IP. Now I'm searching for a way to call a webservice by
choosing exacly one of those adapters (which is not the default one).

How can I do than?

java.net.NetworkInterface shows me what is available, but where can it
set what to use? org.apache.axis.client.Call?
org.apache.axis.client.Service?

Can anybody help me?

Carsten




Re: How can I publish my web service?

2006-04-25 Thread Anne Thomas Manes
The public UDDI registry has been taken down, so you will need to set up your own registry. The Apache jUDDI project provides an open source UDDI implementation -- see http://ws.apache.org/juddi/
. Or you might install the Systinet Registry -- see http://www.systinet.com/products/sr/overview. Systinet provides a free download, and it provides a really easy to use utility called wsdl2uddi. It will automatically register your service based on the WSDL document.
AnneOn 4/24/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:Hi All,Can someone please advice me how to publish my Web Service, I have created
WSDL file ...I have a test client program, and successully invoked myservices using the stub classes. I am doing this a final year project, Ihave my presentation next week and thought it would be great if I can
demonstrate my service as registered with a UDDI and my Client programlooks for this service via UDDI Please advice, thanxyasmin


Re: Sending my own object Type as SOAP message

2006-04-25 Thread robert lazarski
My recomendation is to do this via WSDL (preferably doc / lit style)
and databinding. Arrays are supported. Both axis 1.x and Axis2 have
docs showing how. 

HTH,
Robert
http://www.braziloutsource.com/On 4/25/06, [EMAIL PROTECTED]
 <[EMAIL PROTECTED]> wrote:
Hi there,Can someone please explain to me how I can send my own Java object (i.e. Ihave a java class called AccidentRecord) I want to send an Array ofAccidentRecord via SOAP to my client when they invoke my service portType,
getAccidents(String numberOfAccidents, String queryNumber) ...pleaseadvice?Thanxyasmin


RE: WSDL2Java - I must be stupid

2006-04-25 Thread Luis Antonio Martinez Cuevas
Hi all.

I hope you can help me, I am tryin to run the calculator example, this
is the client, but when I call it I gey this Error


C:\desarrollo\Tomcat 5.0\webapps\axis\WEB-INF\classes>java ClienteCalc
sumar 234
 23
Exception in thread "main" java.lang.NoClassDefFoundError:
org/w3c/dom/Node
at
org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.(Service.java:113)
at ClienteCalc.main(ClienteCalc.java:27)


could some one help me?




import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;

import javax.xml.rpc.ParameterMode;

public class ClienteCalc
{
   public static void main(String [] args) throws Exception {

   String endpoint = "http://localhost/axis/Calculadora.jws";;

   if (args == null || args.length != 3) {
   System.err.println("Uso: ClienteCalc  arg1
arg2");
   return;
   }

   String method = args[0];
   if (!(method.equals("sumar") || method.equals("restar"))) {
   System.err.println("Uso: ClienteCalc  arg1
arg2");
   return;
   }

   Integer i1 = new Integer(args[1]);
   Integer i2 = new Integer(args[2]);

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

   call.setTargetEndpointAddress( new java.net.URL(endpoint) );
   call.setOperationName( method );
   call.addParameter( "op1", XMLType.XSD_INT, ParameterMode.IN );
   call.addParameter( "op2", XMLType.XSD_INT, ParameterMode.IN );
   call.setReturnType( XMLType.XSD_INT );

   Integer ret = (Integer) call.invoke( new Object [] { i1, i2 });

   System.out.println("Resultado : " + ret);
   }
}


Sending my own Object Types via AXIS-SOAP engin

2006-04-25 Thread rafiqy
Hi All,

Can someone please advice me how I can send my own object type, i.e. I
have an object called AccidentRecords, I want to send these accident
records held in an Array of AccidentRecordsArray as a SOAP response to my
service call : sendAccidents ???

I'll appreciate any avice.

Thanx

yasmin




Re: java.lang.RuntimeException: Data binding error

2006-04-25 Thread robert lazarski
Could you try to see if this problem exists while running RC2 ? Your
wsdl seems OK. It would also help us track down the problem if you post
Cur.java, around the relevant part where its throwing NPE. 

HTH,
Robert
http://www.braziloutsource.com/On 4/25/06, Ritesh Dubey <
[EMAIL PROTECTED]> wrote:Hi,I am getting a Data Binding error with Axis2 .95 version.
Atached is my wsdl file.I am using Geronimo1.0/jdk1.4.1/Axis2/ the error is :run.client: [java] logion111 [java] logion2 [java] logion333 [java] Login Method Called
 [java] Login Method ** CreateClient{http://www.example.com/Onl ineBanking}Login [java] Login Method ** getOption.set action [java] Login Method **
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true) [java] Login Method ** create SOAP envelope with thatpayload [java] Login method* Style is Doc.
 [java] Login method*getFactory [java] Login method*create message context with that soapenvel ope [java] Login method*add the message contxt to the operation
cli ent [java] org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: Databinding  error; nested exception is: [java] java.lang.RuntimeException: Data binding error [java] at org.apache.axis2.AxisFault.makeFault
(AxisFault.java:267) [java] atcom.ibm.axis2.onlinebanking.OnlineBankingPortTypeMessageReceiverInOut.invokeBusinessLogic(OnlineBankingPortTypeMessageReceiverInOut.java:297) [java] at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(AbstractInOutSyncMessageReceiver.java:37) [java] atorg.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:408) [java] at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:288) [java] atorg.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160) [java] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:615) [java] atjavax.servlet.http.HttpServlet.service(HttpServlet.java:688) [java] atorg.apache.catalina.core.ApplicationFilterChain.internalDoFil
ter(ApplicationFilterChain.java:252) [java] atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) [java] atorg.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:213) [java] atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) [java] atorg.apache.geronimo.tomcat.GeronimoStandardContext$SystemMeth
odValve.invoke(GeronimoStandardContext.java:272) [java] atorg.apache.geronimo.tomcat.valve.TransactionContextValve.invoke(TransactionContextValve.java:53) [java] atorg.apache.geronimo.tomcat.valve.ComponentContextValve.invoke
(ComponentContextValve.java:47) [java] atorg.apache.geronimo.tomcat.valve.InstanceContextValve.invoke(InstanceContextValve.java:60) [java] atorg.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126) [java] atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) [java] atorg.apache.catalina.core.StandardEngineValve.invoke(StandardE
ngineValve.java:107) [java] atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:526) [java] atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:148) [java] atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [java] atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(
Http11Protocol.java:744) [java] atorg.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) [java] atorg.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:80) [java] atorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) [java] at java.lang.Thread.run(Thread.java:534) [java] Caused by: 
java.lang.RuntimeException: Data binding error [java] atcom.ibm.axis2.onlinebanking.OnlineBankingPortTypeMessageReceiverInOut.fromOM(OnlineBankingPortTypeMessageReceiverInOut.java:1039) [java] at
com.ibm.axis2.onlinebanking.OnlineBankingPortTypeMessageReceiverInOut.invokeBusinessLogic(OnlineBankingPortTypeMessageReceiverInOut.java:121) [java] ... 25 more [java] Caused by: java.lang.NullPointerException
 [java] atorg.apache.xmlbeans.impl.store.Cur$CurLoadContext.finish(Cur.java:3184) [java] atorg.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1216) [java] at
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843) [java] atorg.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826) [java] atorg.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse
(SchemaTypeLoade

[Axis2][0.95] How can my service make call to another service?

2006-04-25 Thread Ali Sadik Kumlali
Hi all,

I need my service to call another service. But, it somehow cannot see
modules and thus doesn't add security/addressing headers.

I tried engaging the modules manually as in test client. But, it
couldn't find the modules.

Any help would be appreciated.

Thanks,

Ali Sadik Kumlali

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


Sending my own object Type as SOAP message

2006-04-25 Thread rafiqy
Hi there,

Can someone please explain to me how I can send my own Java object (i.e. I
have a java class called AccidentRecord) I want to send an Array of
AccidentRecord via SOAP to my client when they invoke my service portType,
getAccidents(String numberOfAccidents, String queryNumber) ...please
advice?

Thanx

yasmin




Re: [Axis2] OMElement question

2006-04-25 Thread Michele Mazzucco
Hi Ajith,

I'm sorry, but can you be more clear, please? Could you show me a
practical example?

Thanks,
Michele

Ajith Ranabahu wrote:
> Hi,
> yes this is possible :) Axis2 explicitly allows any databinding to be
> plugged in and infact if you codegen for different frameworks like
> xmlbeans/adb/jaxme you'll see how  the codegenerator generates the
> skeletons referring to the generated databinding classes.
> 
> if you are doing it by hand then you'll have to write your custom
> message receiver and write the fromOM and toOM conversion methods as
> well (the implementation of these methods are dependent on the
> databinding framework)
> My guess is the best choice for you would be to run the codegen with
> XMLbeans and look at the generated code. You can then replace the
> necessary classes and rewrite the conversion methods.
> 
> 
> On 4/25/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
>> Hi all,
>>
>> starting from an xml schema, I generate Java classes with JAXB. Now the
>> question is, can I use those objects as return type or method
>> argument(s) of my web service methods or I must use exclusively
>> OMElement objects?
>>
>> i.e.
>>
>> say, for an in-out operation, I generate two classes from the xml
>> schema, RequestObject and ReplyObject. Which of the two options is the
>> correct one?,
>>
>> // web service method
>> ReplyObject fooMethod(RequestObject arg) {
>> ...
>> }
>>
>> or
>>
>> OMElement fooMethod(OMElement arg) {
>> ...
>> }
>>
>> Thanks,
>> Michele
>>
> 
> 
> --
> Ajith Ranabahu


Re: [Axis2] OMElement question

2006-04-25 Thread Ajith Ranabahu
Hi,
yes this is possible :) Axis2 explicitly allows any databinding to be
plugged in and infact if you codegen for different frameworks like
xmlbeans/adb/jaxme you'll see how  the codegenerator generates the
skeletons referring to the generated databinding classes.

if you are doing it by hand then you'll have to write your custom
message receiver and write the fromOM and toOM conversion methods as
well (the implementation of these methods are dependent on the
databinding framework)
My guess is the best choice for you would be to run the codegen with
XMLbeans and look at the generated code. You can then replace the
necessary classes and rewrite the conversion methods.


On 4/25/06, Michele Mazzucco <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> starting from an xml schema, I generate Java classes with JAXB. Now the
> question is, can I use those objects as return type or method
> argument(s) of my web service methods or I must use exclusively
> OMElement objects?
>
> i.e.
>
> say, for an in-out operation, I generate two classes from the xml
> schema, RequestObject and ReplyObject. Which of the two options is the
> correct one?,
>
> // web service method
> ReplyObject fooMethod(RequestObject arg) {
> ...
> }
>
> or
>
> OMElement fooMethod(OMElement arg) {
> ...
> }
>
> Thanks,
> Michele
>


--
Ajith Ranabahu


ReplyTo in MessageContext always null

2006-04-25 Thread f . linz
Hi!

It tried to invoke my webservice with replyTo information according to
WS-Addressing with the SOAP-Message at the end of this mail.
Unfortunately the getReplyTo in the MessageContext of my MessageReceiver
always returns null. 

I assume its a stupid mistake, but at the moment I don't know how to get on.


Thanks for any hints!

Fabian

 
 http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
 
http://schemas.xmlsoap.org/ws/2003/03/addressing";
soapenv:mustUnderstand="0" soapenv:actor="">
  http://example.addition";
PortName="AdditionCallbackServicePort">cr:AdditionCallbackService
 
http://localhost:8080/active-bpel/services/AdditionCallbackService

  
  
http://example.addition";>
  2
  0
  2

  
 

-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner


[Axis2] Samples for Message Exchange Patterns

2006-04-25 Thread Siamak Haschemi

Hello to all.

Could someone send me a little WSDL sample of using Axis2 with

- InOut (with Failure)
- InOnly
- Robust-InOnly

The Failures should be custom Exception defined through a Schema file...


This would be great and I think that I should be part of the -> 
userguide <-.


So, experts, please help me.

Thank you very much,

Siamak Haschemi


[Axis2] OMElement question

2006-04-25 Thread Michele Mazzucco
Hi all,

starting from an xml schema, I generate Java classes with JAXB. Now the
question is, can I use those objects as return type or method
argument(s) of my web service methods or I must use exclusively
OMElement objects?

i.e.

say, for an in-out operation, I generate two classes from the xml
schema, RequestObject and ReplyObject. Which of the two options is the
correct one?,

// web service method
ReplyObject fooMethod(RequestObject arg) {
...
}

or

OMElement fooMethod(OMElement arg) {
...
}

Thanks,
Michele


Re: WSDD to set up an RPC/Literal service

2006-04-25 Thread Kevin O'Rourke
Thanks for the information.

Anne Thomas Manes wrote:
> .NET doesn't support RPC/Literal (although Indigo will). For best
> interoperability with .NET, you want to use "wrapped" document/literal.
> (From a programming perspective, WRAPPED is pretty much identical to RPC
> style).
> 
> In java2wsdl, specify -yWRAPPED.
> In WSDD, specify style="WRAPPED".
I just tried using VB.Net with style="wrapped", everything looks OK
using SOAPMonitor and VB doesn't complain but I just get a load of empty
objects.

I think for now I'll stick with RPC/Encoded, although Microsoft's
WSDL.EXE tool complains about it not being WS-I compliant at least it
actually works!

Kevin