Re: axis2 + Spring2.5+Hibernate

2009-07-28 Thread Sagara Gunathunga
Hi,
I have noticed following problems with your approach.

1.) You have placed service.xml file in a wrong place , it should be
like this  /mysite/META-INF/services/services.xml . ( refer [1] to get
familiar with correct directory structure )

2.)As a suggestion in DataSetServiceEnquiry class you can expose your
web service as a POJO method. Axis2 supports for exposing Spring beans
(POJO) as web services, here you don't need to deal with OMElement
unless you really want to do so .

  instead of  public OMElement getValue(OMElement ignore)  method,
simply you can use following method with RPCMessageReceiver (in
service.xml).

   public String getValue(){
return this.dataSetEnquiryManager.getValue();
   }


3.) you haven't mention any thing about web.xml file or how you deploy
your service whether it  as a WAR archive or as a AAR archive ?



[1] - http://www.developer.com/open/article.php/3777111

Thanks ,


On Wed, Jul 29, 2009 at 8:44 AM, sam wong wrote:
> hi,Sagara
> first ,  my web site is working.
>
> 1.   Spring Bean
>
> public interface IDataSetEnquiryManager {
>   public String getValue();
> }
> public class DataSetEnquiryManagerImpl  implements IDataSetEnquiryManager {
>   public String getValue(){
>      return "TEST";
>   }
> }
>
> applicationContext.xml is:
>
>         class="com.eadi.ws.DataSetServiceEnquiry">
>        
>                
>        
> 
>                class="com.eadi.service.impl.DataSetEnquiryManagerImpl">
> 
>
> 2.  web service class,
>
> DataSetServiceEnquiry.java :
>
> package com.eadi.ws;
> import org.apache.axiom.om.OMAbstractFactory;
> import org.apache.axiom.om.OMElement;
> import org.apache.axiom.om.OMFactory;
> import org.apache.axiom.om.OMNamespace;
> import org.apache.axiom.om.OMText;
>
> import com.eadi.service.IDataSetEnquiryManager;
> public class DataSetServiceEnquiry {
>    private IDataSetEnquiryManager dataSetEnquiryManager = null;
>    public IDataSetEnquiryManager getDataSetEnquiryManager() {
>                return dataSetEnquiryManager;
>        }
>        public void setDataSetEnquiryManager(
>                        IDataSetEnquiryManager dataSetEnquiryManager) {
>                this.dataSetEnquiryManager = dataSetEnquiryManager;
>        }
>    // The web service
>    public OMElement getValue(OMElement ignore) {
>            OMFactory factory=OMAbstractFactory.getOMFactory();
>            OMNamespace payloadNs=
> factory.createOMNamespace("http://ws.eadi.com/datasetenquiry";,
> "datasetenquiry");
>            OMElement payload =factory.createOMElement("string", payloadNs);
>            OMText response =
> factory.createOMText(this.dataSetEnquiryManager.getValue());
>            payload.addChild(response);
>            return payload;
>    }
> }
>
>
>
> 3. add services.xml to    /mysite/META-INF/services.xml
>
> 
>  
>    
>        simple spring example
>    
>     name="ServiceObjectSupplier">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier
>    dataSetServiceEnquiry
>    
>         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
>    
> 
> 
>
>
>
> 4. open url in browser :
> http://localhost:8080/EADIWeb/services/DataSetServiceEnquiry?wsdl
>
>
> and got error result:
>
> 11:09:14,877 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
> javax.servlet.ServletException: File
> "/axis2-web/listSingleService.jsp" not found
>        at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
>        at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
>        at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
>        at 
> org.apache.axis2.transport.http.AbstractAgent.renderView(AbstractAgent.java:121)
>        at 
> org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:407)
>        at 
> org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:242)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at com.eadi.web.bean.SessionFilter.doFilter(SessionFilter.java:98)
>        at 
> org.apache.catalina.core.ApplicationFilt

axis2 with spring

2009-07-28 Thread sam wong
hi, everybody,

 i have a web site  wrote with  jsf1.2+Spring2.5+Hibernate.

now need to publish some Spring Bean as WebService( use axis).

what steps should i do ?

Thanks a lot.
Sam Wong


java2wsdl arrays not getting set unbounded

2009-07-28 Thread Lachlan Deck

Hi there,

Any help appreciated for the following problem :-)

Each time I regenerate classes from an rpc-based wsdl any arrays  
defined are wrongly created.


i.e., they have the private field and usual bean-style getter and  
setter but they're missing the following two additional steps:

1) elemField.setMaxOccursUnbounded(true);

2) array access helpers:
get(int i) {..}
set(int i, Type value) {...}

Without these two things - I find that at runtime it only deserialises  
a single element of the array even though the array was passed with  
multiple elments (e.g., multiple invoice lines, only a single one  
received!). That same problem is described here and info is given on  
manually fixing it - but it's a maintenance nightmare!

http://publib.boulder.ibm.com/infocenter/wpc/v5r3m2/index.jsp?topic=/com.ibm.wpc.doc/javaapi/japi6.html

Is anyone aware of a WSDL2JavaFactory class helper (or have  
instructions on how to go about creating one) that will fix these  
things whenever the java is generated from the wsdl?


It's really annoying having to (a) create them by hand and (b) revert  
part of the changes on each file that was updated every time there's  
an update.


with regards,
--

Lachlan Deck





Re: axis2 + Spring2.5+Hibernate

2009-07-28 Thread sam wong
hi,Sagara
first ,  my web site is working.

1.   Spring Bean

public interface IDataSetEnquiryManager {
   public String getValue();
}
public class DataSetEnquiryManagerImpl  implements IDataSetEnquiryManager {
   public String getValue(){
  return "TEST";
   }
}

applicationContext.xml is:









2.  web service class,

DataSetServiceEnquiry.java :

package com.eadi.ws;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axiom.om.OMText;

import com.eadi.service.IDataSetEnquiryManager;
public class DataSetServiceEnquiry {
private IDataSetEnquiryManager dataSetEnquiryManager = null;
public IDataSetEnquiryManager getDataSetEnquiryManager() {
return dataSetEnquiryManager;
}
public void setDataSetEnquiryManager(
IDataSetEnquiryManager dataSetEnquiryManager) {
this.dataSetEnquiryManager = dataSetEnquiryManager;
}   
// The web service
public OMElement getValue(OMElement ignore) {
OMFactory factory=OMAbstractFactory.getOMFactory();
OMNamespace payloadNs=
factory.createOMNamespace("http://ws.eadi.com/datasetenquiry";,
"datasetenquiry");
OMElement payload =factory.createOMElement("string", payloadNs);
OMText response =
factory.createOMText(this.dataSetEnquiryManager.getValue());
payload.addChild(response);
return payload;
}
}



3. add services.xml to/mysite/META-INF/services.xml


 

simple spring example

org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier
dataSetServiceEnquiry








4. open url in browser :
http://localhost:8080/EADIWeb/services/DataSetServiceEnquiry?wsdl


and got error result:

11:09:14,877 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.servlet.ServletException: File
"/axis2-web/listSingleService.jsp" not found
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at 
org.apache.axis2.transport.http.AbstractAgent.renderView(AbstractAgent.java:121)
at 
org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:407)
at 
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:242)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.eadi.web.bean.SessionFilter.doFilter(SessionFilter.java:98)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Proc

Re: Issue in SignedSupportingTokens with IssuedToken requesting for SAML

2009-07-28 Thread prabath

Hi Amitesh;

Please have a look at [1]. It explains exactly what you want I guess.

Thanks & regards.
-Prabath

[1]:http://blog.facilelogin.com/2009/05/accessing-proxy-services-in-wso2-esb.html

amiteshksingh wrote:

Hi Prabath,

Thank you very much for reply. 
My requirement is little bit changed, I want signed SAML token from STS,

since SAML token issued by STS would contain some user info in
AttributeStatement, requirement says it must be signed. The policy file
which you sent is more about signing the message using issued SAML token. In
my case SAML token is not protection token, its a supporting token. I am new
to WS security, and I am not able to find the sample which uses this type of
requirement. I read from specification and it says signed supporting token
is used for this purpose (getting signed token from STS). I would higly
appreciate if you can provide any sample policy file for this type of
requirement.

Thanks,
Amitesh


amiteshksingh wrote:
  

Hi,
I am not finding any sample which desribes the use of signed supporting
token uses issued token and requesting for SAML. 


I would appreciate, if anybody can provide that one.

I am using the below policy

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
http://www.w3.org/2005/08/addressing";>http://localhost:8090/axis2/services/STS
http://www.w3.org/2005/08/addressing";>
   
xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex";
   
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

http://schemas.xmlsoap.org/ws/2004/09/mex";>

   
xmlns="http://www.w3.org/2005/08/addressing";>http://localhost:8090/axis2/services/mex







http://schemas.xmlsoap.org/ws/2005/02/trust";>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1
http://schemas.xmlsoap.org/ws/2005/02/trust";>http://schemas.xmlsoap.org/ws/2005/02/trust/PublicKey
http://schemas.xmlsoap.org/ws/2005/02/trust";>256
			xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/10/xml-exc-c14n# 
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/04/xmlenc#aes256-cbc 
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/04/xmlenc#aes256-cbc 
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2000/09/xmldsig#hmac-sha1 
		



		 




  
  


but I am not able to get the saml assetion. I am getting the below error

Exception in thread "main" org.apache.axis2.AxisFault: Error in signature
with a custom token
at 
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:429)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
at com.accenture.apsp.security.Client.main(Client.java:82)
Caused by: org.apache.rampart.RampartException: Error in signature with a
custom token
at
org.apache.rampart.builder.BindingBuilder.doSymmSignature(BindingBuilder.java:683)
at
org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(SymmetricBindingBuilder.java:504)
at
org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:90)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:144)
at 
org.apache.rampart.

Re: axis2 + Spring2.5+Hibernate

2009-07-28 Thread Sagara Gunathunga
AFAIK there is no any restriction with Spring 2.5 or any other version
, i don't think you will encounter any version problem. As i remember
i have used Spring 2.5.6 without any problems, so you better to try
out first and write back to the list if you get any issue.

Thanks ,

On Wed, Jul 29, 2009 at 6:57 AM, sam wong wrote:
> hi,Sagara,
>
> I found this in the sample page :Spring versions 1.2.6, 1.2.8 and 2.0
> have been tested, but probably any version would work as only the core
> functionality is required.
>
> I am using spring 2.5,
> current axis2 version is not support spring 2.5 ?
>
>
>
> Best & Regards,
> Sam Wong
>
>
>
>
>
> 2009/7/29 Sagara Gunathunga :
>> Hi ,
>> You can write your functions with Spring/Hibernate as usual and then
>> possible to expose your Spring services ( a bean) as a web service
>> using Axis2 -Spring integration.
>>
>> Basically you have to do following two steps.
>>
>> 1.) Like in any other web framework define the Spring
>> ContextLoaderListener in the web.xml file in order to load the Spring
>> ApplicationContext.
>>
>> 2.) Define SpringServletContextObjectSupplier as the
>> ServiceObjectSupplier for your web service , you can define this in
>> the axis2 service.xml file.
>>
>> please refer[1] for details and code samples.
>>
>> [1] - http://ws.apache.org/axis2/1_5/spring.html
>>
>> Thanks ,
>>
>> On Tue, Jul 28, 2009 at 11:16 PM, sam wong wrote:
>>> hi, everybody,
>>>
>>> I hava a web project writing with Spring2.5+Hibernate
>>> some function need publish as WebService.
>>> I want to use Axis2 to impletment this.
>>>
>>>
>>> anybody can  give me some Tutorial about this?
>>>
>>>
>>>
>>> thanks a lot..
>>>
>>>
>>>
>>> Sam Wong.
>>>
>>
>>
>>
>> --
>> Sagara Gunathunga
>>
>> Blog - http://ssagara.blogspot.com
>> Web - http://sagaras.awardspace.com/
>>
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


Re: axis2 + Spring2.5+Hibernate

2009-07-28 Thread sam wong
hi,Sagara,

I found this in the sample page :Spring versions 1.2.6, 1.2.8 and 2.0
have been tested, but probably any version would work as only the core
functionality is required.

I am using spring 2.5,
current axis2 version is not support spring 2.5 ?



Best & Regards,
Sam Wong





2009/7/29 Sagara Gunathunga :
> Hi ,
> You can write your functions with Spring/Hibernate as usual and then
> possible to expose your Spring services ( a bean) as a web service
> using Axis2 -Spring integration.
>
> Basically you have to do following two steps.
>
> 1.) Like in any other web framework define the Spring
> ContextLoaderListener in the web.xml file in order to load the Spring
> ApplicationContext.
>
> 2.) Define SpringServletContextObjectSupplier as the
> ServiceObjectSupplier for your web service , you can define this in
> the axis2 service.xml file.
>
> please refer[1] for details and code samples.
>
> [1] - http://ws.apache.org/axis2/1_5/spring.html
>
> Thanks ,
>
> On Tue, Jul 28, 2009 at 11:16 PM, sam wong wrote:
>> hi, everybody,
>>
>> I hava a web project writing with Spring2.5+Hibernate
>> some function need publish as WebService.
>> I want to use Axis2 to impletment this.
>>
>>
>> anybody can  give me some Tutorial about this?
>>
>>
>>
>> thanks a lot..
>>
>>
>>
>> Sam Wong.
>>
>
>
>
> --
> Sagara Gunathunga
>
> Blog - http://ssagara.blogspot.com
> Web - http://sagaras.awardspace.com/
>


Re: Issue in SignedSupportingTokens with IssuedToken requesting for SAML

2009-07-28 Thread amiteshksingh

Hi Prabath,

Thank you very much for reply. 
My requirement is little bit changed, I want signed SAML token from STS,
since SAML token issued by STS would contain some user info in
AttributeStatement, requirement says it must be signed. The policy file
which you sent is more about signing the message using issued SAML token. In
my case SAML token is not protection token, its a supporting token. I am new
to WS security, and I am not able to find the sample which uses this type of
requirement. I read from specification and it says signed supporting token
is used for this purpose (getting signed token from STS). I would higly
appreciate if you can provide any sample policy file for this type of
requirement.

Thanks,
Amitesh


amiteshksingh wrote:
> 
> Hi,
> I am not finding any sample which desribes the use of signed supporting
> token uses issued token and requesting for SAML. 
> 
> I would appreciate, if anybody can provide that one.
> 
> I am using the below policy
> 
>  xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>   
>sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
>xmlns="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>xmlns="http://www.w3.org/2005/08/addressing";>http://localhost:8090/axis2/services/STS
>xmlns="http://www.w3.org/2005/08/addressing";>
> 
> xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex";
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>  Dialect="http://schemas.xmlsoap.org/ws/2004/09/mex";>
> 
> 
> xmlns="http://www.w3.org/2005/08/addressing";>http://localhost:8090/axis2/services/mex
> 
> 
> 
> 
>   
>   
>xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1
>xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>http://schemas.xmlsoap.org/ws/2005/02/trust/PublicKey
>xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>256
>xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/10/xml-exc-c14n#
>  
>  xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/04/xmlenc#aes256-cbc
>  
>  xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/04/xmlenc#aes256-cbc
>  
>  xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2000/09/xmldsig#hmac-sha1
>  
>   
> 
>   
>
>   
> 
>   
>   
>   
> 
> 
> 
> but I am not able to get the saml assetion. I am getting the below error
> 
> Exception in thread "main" org.apache.axis2.AxisFault: Error in signature
> with a custom token
>   at 
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
>   at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
>   at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:429)
>   at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
>   at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
>   at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>   at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
>   at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>   at com.accenture.apsp.security.Client.main(Client.java:82)
> Caused by: org.apache.rampart.RampartException: Error in signature with a
> custom token
>   at
> org.apache.rampart.builder.BindingBuilder.doSymmSignature(BindingBuilder.java:683)
>   at
> org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(SymmetricBindingBuilder.java:504)
>   at
> org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:90)
>   at org.apache.ramp

Help with Deserialization of complex object with Java Webservice

2009-07-28 Thread guitarro17

Let me explain. 
I have this object:
public class Alert {
private String name;
private String approximateStartDate;
private String startDate;
private String stopDate;
...
}
And in my webservice, I have this method:
public Alert[] getAlerts() throws Exception{
Vector vetorAlerts = new Vector();
vetorAlerts = leitor.readAlerts();

Alert[] Alerts = new Alert[vetorAlerts.size()];
for(int i=0; ihttp://www.nabble.com/Help-with-Deserialization-of-complex-object-with-Java-Webservice-tp24709922p24709922.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: schema location resolution

2009-07-28 Thread Dmitry Beransky
filed as https://issues.apache.org/jira/browse/AXIS2-4451

thanks

On Tue, Jul 28, 2009 at 12:06 PM, Andreas
Veithen wrote:
> Dmitry,
>
> I already noticed previously that the code responsible for the import
> rewriting and WSDL/XSD request handling looks very suspicious, but I
> didn't realize that it is so broken :-(. Can you please create a JIRA
> report with your findings?
>
> Thanks.
>
> Andreas
>
> On Mon, Jul 27, 2009 at 20:35, Dmitry Beransky wrote:
>> On Sat, Jul 25, 2009 at 8:31 AM, Andreas
>> Veithen wrote:
>>> This means that the XSD file is also in the classpath of the Axis2 web app.
>>
>> I've checked and double checked, there is no other schema file on the
>> classpath.  I've gathered up more data about the issue:
>>
>> So, as I mentioned in the original email, I service S4 uses wsdl from
>> S4.wsdl, which imports schema from S4.xsd, which imports schema from
>> enterprise-common.xsd.
>>
>> The location of service's wsdl is .
>>
>> When Axis2 service the WSDL document, it rewrites schemaLocation to be
>> 'schemaLocation="S4?xsd=S4.xsd"'.  So, S4.xsd's absolute URL becomes
>> .
>>
>> enterprise-common.xsd location inside of S4.xsd is defined as
>> 'schemaLocation="enterprise-common.xsd"'.  When Axis2 returns S4.xsd
>> it doesn't rewrite schema's location like it does with the wsdl
>> document, so enterprise-common.xsd's absolute URL becomes
>> .
>>
>> When Axis2 recieves a request for
>> , which now
>> doesn't have a service binding in the URL, how does it locate the
>> schema?  From what I can tell, it simply goes through all installed
>> .aars looking for one that has the file.
>>
>> Also, consider these three URLs:
>>
>> 1. http://localhost/axis2/services/enterprise-common.xsd
>> 2. http://localhost/axis2/services/S4/enterprise-common.xsd
>> 3. http://localhost/axis2/services/S4?xsd=enterprise-common.xsd
>>
>> Only #3 returns the schema that is defined inside of S4.aar (the
>> newest version).   #1 & #2 return an older version of
>> enterprise-common.xsd that sits in other .aars.  If I undeploy S1, S2,
>> and S3 .aars, then #1 & #2 return the latest version from S4.
>>
>>
>> Dmitry
>>
>


Re: axis2 + Spring2.5+Hibernate

2009-07-28 Thread Sagara Gunathunga
Hi ,
You can write your functions with Spring/Hibernate as usual and then
possible to expose your Spring services ( a bean) as a web service
using Axis2 -Spring integration.

Basically you have to do following two steps.

1.) Like in any other web framework define the Spring
ContextLoaderListener in the web.xml file in order to load the Spring
ApplicationContext.

2.) Define SpringServletContextObjectSupplier as the
ServiceObjectSupplier for your web service , you can define this in
the axis2 service.xml file.

please refer[1] for details and code samples.

[1] - http://ws.apache.org/axis2/1_5/spring.html

Thanks ,

On Tue, Jul 28, 2009 at 11:16 PM, sam wong wrote:
> hi, everybody,
>
> I hava a web project writing with Spring2.5+Hibernate
> some function need publish as WebService.
> I want to use Axis2 to impletment this.
>
>
> anybody can  give me some Tutorial about this?
>
>
>
> thanks a lot..
>
>
>
> Sam Wong.
>



-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/


Re: schema location resolution

2009-07-28 Thread Andreas Veithen
Dmitry,

I already noticed previously that the code responsible for the import
rewriting and WSDL/XSD request handling looks very suspicious, but I
didn't realize that it is so broken :-(. Can you please create a JIRA
report with your findings?

Thanks.

Andreas

On Mon, Jul 27, 2009 at 20:35, Dmitry Beransky wrote:
> On Sat, Jul 25, 2009 at 8:31 AM, Andreas
> Veithen wrote:
>> This means that the XSD file is also in the classpath of the Axis2 web app.
>
> I've checked and double checked, there is no other schema file on the
> classpath.  I've gathered up more data about the issue:
>
> So, as I mentioned in the original email, I service S4 uses wsdl from
> S4.wsdl, which imports schema from S4.xsd, which imports schema from
> enterprise-common.xsd.
>
> The location of service's wsdl is .
>
> When Axis2 service the WSDL document, it rewrites schemaLocation to be
> 'schemaLocation="S4?xsd=S4.xsd"'.  So, S4.xsd's absolute URL becomes
> .
>
> enterprise-common.xsd location inside of S4.xsd is defined as
> 'schemaLocation="enterprise-common.xsd"'.  When Axis2 returns S4.xsd
> it doesn't rewrite schema's location like it does with the wsdl
> document, so enterprise-common.xsd's absolute URL becomes
> .
>
> When Axis2 recieves a request for
> , which now
> doesn't have a service binding in the URL, how does it locate the
> schema?  From what I can tell, it simply goes through all installed
> .aars looking for one that has the file.
>
> Also, consider these three URLs:
>
> 1. http://localhost/axis2/services/enterprise-common.xsd
> 2. http://localhost/axis2/services/S4/enterprise-common.xsd
> 3. http://localhost/axis2/services/S4?xsd=enterprise-common.xsd
>
> Only #3 returns the schema that is defined inside of S4.aar (the
> newest version).   #1 & #2 return an older version of
> enterprise-common.xsd that sits in other .aars.  If I undeploy S1, S2,
> and S3 .aars, then #1 & #2 return the latest version from S4.
>
>
> Dmitry
>


Re: Problem calling Web Service -> HTTP 503 error

2009-07-28 Thread Andreas Veithen
Jan,

Axis2 uses commons-logging. If log4j is in your classpath, then you
can configure it in log4j.properties.

Andreas

On Tue, Jul 28, 2009 at 19:30, Jan Freitag wrote:
> Hi Andreas,
>
> thank you very much! But I have at the moment not the possiblity to look at
> the server logs and I do not really know how to trace on my client. I've
> looked in the axis2.xml for logging options but found nothing that helped.
>
> Can you give me a tip how to trace on my client?
>
> Jan
>
>
> Am 24.07.2009 um 00:10 schrieb Andreas Veithen:
>
>> Jan,
>>
>> This is what happens in this case:
>>
>> 1. Your client sends a request to the server.
>> 2. That request is rejected by the server and it sends back an HTML
>> error page (instead of a SOAP fault). The particularity here is that
>> the error page is XHTML and contains a reference (system ID) to the
>> corresponding DTD.
>> 3. Axis2 receives that response and tries to parse it (using StAX).
>> 4. The StAX parser, seeing the reference to the DTD, tries to load
>> that document (from the address you see in the error message:
>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd).
>> 5. The W3C site probably has a policy in place that blocks access to
>> the DTD to some User-Agents. They do this to protect themselves
>> against libraries/products that repeatedly attempt to download the
>> same DTD (or XML schema) without apparent need for it.
>> 6. StAX gets back an HTTP error 503 (Service unavailable) and reports
>> that as an exception. This is what you see in the logs.
>>
>> Conclusion:
>>
>> - Obviously there is an issue in Axis2: we should not allow the StAX
>> parser to download DTDs from foreign sites. Note that DTDs are never
>> used in SOAP messages.
>> - In your case, the 503 error from www.w3.org obscures the actual
>> error which occurs in your server. Since you are using HTTPS, probably
>> the only way to find out what happens is to look at the server logs or
>> increase the log level of the client (to DEBUG or even TRACE) to see
>> at least the HTTP status line received from the server.
>>
>> Regards,
>>
>> Andreas
>>
>>
>> On Thu, Jul 23, 2009 at 23:19, Jan Freitag wrote:
>>>
>>> Hi Andreas,
>>>
>>> yes here it is:
>>>
>>> org.apache.axis2.AxisFault: java.lang.RuntimeException: [was class
>>> java.io.IOException] Server returned HTTP response code: 503 for URL:
>>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
>>>       at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
>>>       at
>>>
>>> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90)
>>>       at
>>>
>>> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)
>>>       at
>>>
>>> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
>>>       at
>>>
>>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
>>>       at
>>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>>>       at
>>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
>>>       at
>>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>>>       at
>>> server.LSFData.RoomDataClient.getLSFData(RoomDataClient.java:210)
>>>       at server.LSFData.RoomDataClient.getUni(RoomDataClient.java:231)
>>>       at server.LSFData.RoomSearch.(RoomSearch.java:24)
>>>       at server.LSFData.RoomSearch.(RoomSearch.java:18)
>>>       at
>>> server.servlets.MainPageServlet.handleRequest(MainPageServlet.java:47)
>>>       at
>>>
>>> org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:545)
>>>       at
>>>
>>> org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:509)
>>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>>>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>>       at
>>>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>>>       at
>>>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>       at
>>>
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>>       at
>>>
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
>>>       at
>>>
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>>       at
>>>
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>>       at
>>>
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>>>       at
>>>
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>>>       at
>>>
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
>>>       at
>>>
>>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnectio

axis2 + Spring2.5+Hibernate

2009-07-28 Thread sam wong
hi, everybody,

I hava a web project writing with Spring2.5+Hibernate
some function need publish as WebService.
I want to use Axis2 to impletment this.


anybody can  give me some Tutorial about this?



thanks a lot..



Sam Wong.


Re: Issue in SignedSupportingTokens with IssuedToken requesting for SAML

2009-07-28 Thread prabath

Hi Amitesh;

The attached policy uses an IssuedToken [SAML] for signing.

You may develop the policy there to cater your requirement.

Thanks & regards.
-Prabath

amiteshksingh wrote:

Does anybody know whether it is supported by AXIS2/Rampart or not?

Thanks,
Amitesh


amiteshksingh wrote:
  

Hi,
I am not finding any sample which desribes the use of signed supporting
token uses issued token and requesting for SAML. 


I would appreciate, if anybody can provide that one.

I am using the below policy

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>

http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
http://www.w3.org/2005/08/addressing";>http://localhost:8090/axis2/services/STS
http://www.w3.org/2005/08/addressing";>
   
xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex";
   
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

http://schemas.xmlsoap.org/ws/2004/09/mex";>

   
xmlns="http://www.w3.org/2005/08/addressing";>http://localhost:8090/axis2/services/mex







http://schemas.xmlsoap.org/ws/2005/02/trust";>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1
http://schemas.xmlsoap.org/ws/2005/02/trust";>http://schemas.xmlsoap.org/ws/2005/02/trust/PublicKey
http://schemas.xmlsoap.org/ws/2005/02/trust";>256
			xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/10/xml-exc-c14n# 
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/04/xmlenc#aes256-cbc 
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/04/xmlenc#aes256-cbc 
xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2000/09/xmldsig#hmac-sha1 
		



		 




  
  


but I am not able to get the saml assetion. I am getting the below error

Exception in thread "main" org.apache.axis2.AxisFault: Error in signature
with a custom token
at 
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:429)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
at com.accenture.apsp.security.Client.main(Client.java:82)
Caused by: org.apache.rampart.RampartException: Error in signature with a
custom token
at
org.apache.rampart.builder.BindingBuilder.doSymmSignature(BindingBuilder.java:683)
at
org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(SymmetricBindingBuilder.java:504)
at
org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:90)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:144)
at 
org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
... 9 more
Caused by: org.apache.ws.security.WSSecurityException: Signature creation
failed; nested exception is: 
	org.apache.xml.security.signature.XMLSignatureException: Id not found

Original Exception was
org.apache.xml.security.signature.ReferenceNotInitializedException: Id not
found
Original Exception was
org.apache.xml.security.signature.ReferenceNotInitializedException: Id not
found
Original Exception was
org.apache.xml.security.signature.ReferenceNotInitializedException: Id not
found
Original Exception was
org.apache.xml.security.utils.resolver.ResourceResolverException: Id not
found
at
org.apac

Re: Problem calling Web Service -> HTTP 503 error

2009-07-28 Thread Jan Freitag

Hi Andreas,

thank you very much! But I have at the moment not the possiblity to  
look at the server logs and I do not really know how to trace on my  
client. I've looked in the axis2.xml for logging options but found  
nothing that helped.


Can you give me a tip how to trace on my client?

Jan


Am 24.07.2009 um 00:10 schrieb Andreas Veithen:


Jan,

This is what happens in this case:

1. Your client sends a request to the server.
2. That request is rejected by the server and it sends back an HTML
error page (instead of a SOAP fault). The particularity here is that
the error page is XHTML and contains a reference (system ID) to the
corresponding DTD.
3. Axis2 receives that response and tries to parse it (using StAX).
4. The StAX parser, seeing the reference to the DTD, tries to load
that document (from the address you see in the error message:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd).
5. The W3C site probably has a policy in place that blocks access to
the DTD to some User-Agents. They do this to protect themselves
against libraries/products that repeatedly attempt to download the
same DTD (or XML schema) without apparent need for it.
6. StAX gets back an HTTP error 503 (Service unavailable) and reports
that as an exception. This is what you see in the logs.

Conclusion:

- Obviously there is an issue in Axis2: we should not allow the StAX
parser to download DTDs from foreign sites. Note that DTDs are never
used in SOAP messages.
- In your case, the 503 error from www.w3.org obscures the actual
error which occurs in your server. Since you are using HTTPS, probably
the only way to find out what happens is to look at the server logs or
increase the log level of the client (to DEBUG or even TRACE) to see
at least the HTTP status line received from the server.

Regards,

Andreas


On Thu, Jul 23, 2009 at 23:19, Jan Freitag wrote:

Hi Andreas,

yes here it is:

org.apache.axis2.AxisFault: java.lang.RuntimeException: [was class
java.io.IOException] Server returned HTTP response code: 503 for URL:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
   at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
   at
org 
.apache 
.axis2 
.transport.TransportUtils.createSOAPMessage(TransportUtils.java:90)

   at
org 
.apache 
.axis2 
.description 
.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:353)

   at
org 
.apache 
.axis2 
.description.OutInAxisOperationClient.send(OutInAxisOperation.java: 
416)

   at
org 
.apache 
.axis2 
.description 
.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)

   at
org 
.apache.axis2.client.OperationClient.execute(OperationClient.java: 
163)

   at
org 
.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java: 
548)

   at
org 
.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java: 
528)
   at  
server.LSFData.RoomDataClient.getLSFData(RoomDataClient.java:210)
   at server.LSFData.RoomDataClient.getUni(RoomDataClient.java: 
231)

   at server.LSFData.RoomSearch.(RoomSearch.java:24)
   at server.LSFData.RoomSearch.(RoomSearch.java:18)
   at
server.servlets.MainPageServlet.handleRequest(MainPageServlet.java: 
47)

   at
org 
.apache 
.velocity 
.tools 
.view 
.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:545)

   at
org 
.apache 
.velocity 
.tools 
.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:509)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java: 
690)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java: 
803)

   at
org 
.apache 
.catalina 
.core 
.ApplicationFilterChain 
.internalDoFilter(ApplicationFilterChain.java:269)

   at
org 
.apache 
.catalina 
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 
188)

   at
org 
.apache 
.catalina 
.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

   at
org 
.apache 
.catalina 
.core.StandardContextValve.invoke(StandardContextValve.java:174)

   at
org 
.apache 
.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

   at
org 
.apache 
.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

   at
org 
.apache 
.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 
108)

   at
org 
.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 
174)

   at
org 
.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 
874)

   at
org.apache.coyote.http11.Http11BaseProtocol 
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java: 
665)

   at
org 
.apache 
.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java: 
528)

   at
org 
.apache 
.tomcat 
.util 
.net 
.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

   at
org.apache.tomcat.util.threads.ThreadPool 
$ControlRunnable.run(ThreadPool.java:689)

   at java.lang.Thread.run(Unknown Source)
Caused 

Re: Issue in SignedSupportingTokens with IssuedToken requesting for SAML

2009-07-28 Thread amiteshksingh

Does anybody know whether it is supported by AXIS2/Rampart or not?

Thanks,
Amitesh


amiteshksingh wrote:
> 
> Hi,
> I am not finding any sample which desribes the use of signed supporting
> token uses issued token and requesting for SAML. 
> 
> I would appreciate, if anybody can provide that one.
> 
> I am using the below policy
> 
>  xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>   
>sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
>xmlns="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
>xmlns="http://www.w3.org/2005/08/addressing";>http://localhost:8090/axis2/services/STS
>xmlns="http://www.w3.org/2005/08/addressing";>
> 
> xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex";
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>  Dialect="http://schemas.xmlsoap.org/ws/2004/09/mex";>
> 
> 
> xmlns="http://www.w3.org/2005/08/addressing";>http://localhost:8090/axis2/services/mex
> 
> 
> 
> 
>   
>   
>xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1
>xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>http://schemas.xmlsoap.org/ws/2005/02/trust/PublicKey
>xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>256
>xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/10/xml-exc-c14n#
>  
>  xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/04/xmlenc#aes256-cbc
>  
>  xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2001/04/xmlenc#aes256-cbc
>  
>  xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512";>http://www.w3.org/2000/09/xmldsig#hmac-sha1
>  
>   
> 
>   
>
>   
> 
>   
>   
>   
> 
> 
> 
> but I am not able to get the saml assetion. I am getting the below error
> 
> Exception in thread "main" org.apache.axis2.AxisFault: Error in signature
> with a custom token
>   at 
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
>   at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
>   at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
>   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:429)
>   at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
>   at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
>   at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>   at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
>   at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>   at com.accenture.apsp.security.Client.main(Client.java:82)
> Caused by: org.apache.rampart.RampartException: Error in signature with a
> custom token
>   at
> org.apache.rampart.builder.BindingBuilder.doSymmSignature(BindingBuilder.java:683)
>   at
> org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(SymmetricBindingBuilder.java:504)
>   at
> org.apache.rampart.builder.SymmetricBindingBuilder.build(SymmetricBindingBuilder.java:90)
>   at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:144)
>   at 
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
>   ... 9 more
> Caused by: org.apache.ws.security.WSSecurityException: Signature creation
> failed; nested exception is: 
>   org.apache.xml.security.signature.XMLSignatureException: Id not found
> Original Exception was
> org.apache.xml.security.signature.ReferenceNotInitializedException: Id not
> found
> Original Exception was
> org.apache.xml.security.signature.ReferenceNotInitializedException: Id not
> found
> Original Exception was
> org.apache.xml.security.signature.ReferenceNotInitializedExc

Kerberos support in Axis/Rampart?

2009-07-28 Thread Axis PC
All,

I have seen some third party implementations such as
http://thejavamonkey.blogspot.com/2008/09/axis-2-kerberos-web-services-featuring.html.
I have also seen some posts on people willing to combine these kind of
implementations for kerberos into axis 1.4/1.5. So...what is the progress on
it...has it already been integrated?

Also the above implementation is a bit old...uses Rampart 1.3.

Thanks
Preetham


RE: Axis 1.4 SocketTimeoutException

2009-07-28 Thread Betts, Hendry
Dharmesh,

 

To address this, I have used the following code:

Options options=new Options();

options.setTimeoutInMilliSeconds(int)

 

 

Then before the invoke, I use the setOptions(options) method.

 

Hendry Betts| ViaSat |Developer| *:hendry.be...@viasat.com| *:678.924.2409 | *: 
404.754.0636



From: Chohan, Dharmesh [mailto:dharmesh.cho...@convergys.com] 
Sent: Tuesday, July 28, 2009 9:38 AM
To: axis-user@ws.apache.org
Subject: Axis 1.4 SocketTimeoutException

 

Hi

 

I have used Axis 1.4 to run wsdl2java to generate the Java classes.  When I run 
the application I am getting java.net.SocketTimeoutException: Read timed out. I 
have checked my request and response using wireshark that web server is 
generating a valid SOAP response based on my client call.  

 

However the response is not returned when calling the call.invoke().  The web 
service request is going through a web proxy server

 

Please can anybody help and point me in the right direction.

 

Thanks in advance

Dharmesh 

 

 

 

 

 

 



This e-mail transmission may contain information that is proprietary, 
privileged and/or confidential and is intended exclusively for the person(s) to 
whom it is addressed. Any use, copying, retention or disclosure by any person 
other than the intended recipient or the intended recipient's designees is 
strictly prohibited. If you are the intended recipient, you must treat the 
information in confidence and in accordance with all laws related to the 
privacy and confidentiality of such information. If you are not the intended 
recipient or their designee, please notify the sender immediately by return 
e-mail and delete all copies of this email, including all attachments.

Intervoice, Inc. 17811 Waterview Parkway Dallas, TX 75252 USA

Intervoice Limited, Registered in England and Wales with number 2601740, 50 
Park Road, Gatley, Cheshire, SK8 4HZ. VAT Number: 560421375

Intervoice GmbH, Hagenauer Straße 55, 65203 Wiesbaden, Sitz der Gesellschaft: 
Wiesbaden, Handelsregister: HRB 8186 (Amtsgericht Wiesbaden), Geschäftsführer: 
Wayne Barclay, Steffen Selbmann



Axis 1.4 SocketTimeoutException

2009-07-28 Thread Chohan, Dharmesh
Hi

I have used Axis 1.4 to run wsdl2java to generate the Java classes.  When I run 
the application I am getting java.net.SocketTimeoutException: Read timed out. I 
have checked my request and response using wireshark that web server is 
generating a valid SOAP response based on my client call.

However the response is not returned when calling the call.invoke().  The web 
service request is going through a web proxy server

Please can anybody help and point me in the right direction.

Thanks in advance
Dharmesh









This e-mail transmission may contain information that is proprietary, 
privileged and/or confidential and is intended exclusively for the person(s) to 
whom it is addressed. Any use, copying, retention or disclosure by any person 
other than the intended recipient or the intended recipient's designees is 
strictly prohibited. If you are the intended recipient, you must treat the 
information in confidence and in accordance with all laws related to the 
privacy and confidentiality of such information. If you are not the intended 
recipient or their designee, please notify the sender immediately by return 
e-mail and delete all copies of this email, including all attachments.

Intervoice, Inc. 17811 Waterview Parkway Dallas, TX 75252 USA

Intervoice Limited, Registered in England and Wales with number 2601740, 50 
Park Road, Gatley, Cheshire, SK8 4HZ. VAT Number: 560421375

Intervoice GmbH, Hagenauer Stra?e 55, 65203 Wiesbaden, Sitz der Gesellschaft: 
Wiesbaden, Handelsregister: HRB 8186 (Amtsgericht Wiesbaden), Gesch?ftsf?hrer: 
Wayne Barclay, Steffen Selbmann


WSDL2C SOAP faults

2009-07-28 Thread Owais Khan
Dear all,

With reference to article
http://www.dimuthu.org/blog/2009/02/09/code-generate-custom-soap-faults-for-axis2c/
I have tried to generate code from WSDL provided in this article but I am
unable to get the same skeleton as mentioned in example.

I am using AXIS2 version "*axis2-1.5".* Writer of this article is saying
that you should have latest WSDL2C code.So, I downloaded latest release from
Apache site.

Sample code in article is available at following link so that anyone can try
and let me know if it produces skeleton with SOAP faults or not. Thanks.

https://issues.apache.org/jira/secure/attachment/12399724/case45.zip

Regards,
M Owais Khan.

-- 
Human Knowledge Belongs To World


Re: Custom RPC provider issue

2009-07-28 Thread vck
> Hi Folks,
>
> I am using the WTP in eclipse ganymede to create a simple web service for
> my testing purposes.
>
> My simple webservice works well after the wsdd, wsdl, etc files are
> autogenerated by the plugin.
>
> I now try to change the wsdd a bit by trying to provide my own RPC provider
> called MY_RPC. The relevant portion of the wsdd is below
>
>  
>   
>   
>   
>value="com.mf.ss.SimpleServiceSOAPImplSoapBindingSkeleton"/>
>   
>   http://ss.mf.com"/>
>value="SimpleServiceSOAPImplService"/>
>   http://ss.mf.com"/>
>deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> qname="ns1:UserInfo"
> serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
> type="java:com.mf.ss.UserInfo" xmlns:ns1="http://ss.mf.com"; xmlns:ns2="
> http://xml.apache.org/axis/wsdd/"/>
>  
>
> I have also written two classes one extending the WSDD provider which
> returns an instance of a class that extends RPCProvier.
>
> When I deploy this set up, the wsdl generation throws the foll exception
>
> org.apache.axis.deployment.wsdd.WSDDException: No provider type matches
> QName 
> '{http://xml.apache.org/axis/wsdd/providers/java}MY_RPC
> ..
>
> I know I am missing something obvious here, If someone can help me figure
> out the issue, it would be helpful.
>
> cheers!
>
>
>