You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by shyameniw <sh...@gmail.com> on 2011/03/28 19:25:46 UTC

Generating WSDL for custom rampart policy token

I have created a new Security Policy token for Rampart say <CustomToken> of
type SignedSupportingToken. It successfully generates a request with custom
tag in the policy.xml

<sp:SignedSupportingTokens
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
	<wsp:Policy>
		<sp:CustomToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
/>
	</wsp:Policy>
</sp:SignedSupportingTokens>

Now i want to deploy a service which requests for Custom tokens from
clients. For that i added the custom jars to the axis/lib in tomcat/webapps
and above part to the services.xml of the service and deployed it.  

But it does not generates the wsdl for the service and displays a message
"Internal Error" . When i check the tomcat stack trace following exception
was found. 

[INFO] getData request failed for dialect, http://schemas.xmlsoap.org/wsdl/
org.apache.axis2.dataretrieval.DataRetrievalException:
javax.xml.stream.XMLStrea
mException: No open start element, when trying to write end element
        at
org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLD
ataLocator.java:135)
        at
org.apache.axis2.dataretrieval.WSDLDataLocator.getData(WSDLDataLocato
r.java:73)
etc...

What can be the solution for this. 
Any suggestion is most welcome. 

Thanks and regards,
shyameniw


-- 
View this message in context: http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31260403.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Generating WSDL for custom rampart policy token

Posted by shyameniw <sh...@gmail.com>.
Hi, Amila,
i want to use it as an alternative to UsernameToken. I have implemented this
custom token in rampart-policy and build rampart-policy jar with it and i
have successfully used this token and generate client requests too. Now i
want to develop a service that accepts for such token. I think the problem
here is deploying the new rampart-policy.jar in tomcat/webapps/axis. Any
suggestion? 

Amila Jayasekara wrote:
> 
> Hi Shyameniw,
> 
> The wsdl generated in my environment also doesnt show "custom token"
> details. I didnt notice this in previous attempt as i was more focused
> on the exception. Sorry about that.
> 
> About the custom token,
> As far as i know, there is no custom token implementation in
> rampart-policy. As per now we have builders for UsernameToken,
> HttpsToken, IssuedToken, X509Token, SecureConversationToken and
> SecurityContextToken. Therefore your custom token will not get
> validated at deployment time (If you havent implemented one). I
> believe this could be the same reason for not showing custom token in
> the WSDL.
> 
> Thanks
> AmilaJ
> 
> On Mon, Mar 28, 2011 at 9:03 PM, shyameniw <sh...@gmail.com> wrote:
>>
>> Hi Amila,
>> When i used your services.xml it generated following wsdl for the policy.
>> <wsp:Policy wsu:Id="CustomToken">
>>         <wsp:ExactlyOne>
>>                 <wsp:All>
>>                         <sp:SignedSupportingTokens>
>>                                  <wsp:Policy/>
>>                         </sp:SignedSupportingTokens>
>>                 </wsp:All>
>>        </wsp:ExactlyOne>
>> </wsp:Policy>
>>
>> Following is not in the wsdl.
>>
>> <sp:CustomToken
>> sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
>> </sp:CustomToken>
>>
>> This happens to mine's also when i use standard rampart jars. So it
>> should
>> be a problem with my implementation of the custom token or deployment of
>> custom rampart jars.Can u tell me what are the changes you did in
>> standard
>> distribution of axis in tomcat?
>>
>>
>> shyameniw wrote:
>>>
>>> Hi Amila,
>>> I'm using rampart trunk version. I have used your services.xml and
>>> generated the wsdl without an error. So what could be the problem here?
>>>
>>>
>>> Amila Jayasekara wrote:
>>>>
>>>> Hi Shyameniw
>>>>
>>>> I used attached services xml with a custom token and i was able to
>>>> generate WSDL without an error. I used the rampart trunk version. What
>>>> is the rampart version you are using ?
>>>>
>>>> Thanks
>>>> AmilaJ
>>>>
>>>> On Mon, Mar 28, 2011 at 10:25 AM, shyameniw <sh...@gmail.com>
>>>> wrote:
>>>>>
>>>>> I have created a new Security Policy token for Rampart say
>>>>> <CustomToken>
>>>>> of
>>>>> type SignedSupportingToken. It successfully generates a request with
>>>>> custom
>>>>> tag in the policy.xml
>>>>>
>>>>> <sp:SignedSupportingTokens
>>>>> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
>>>>>        <wsp:Policy>
>>>>>                <sp:CustomToken
>>>>> sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
>>>>> />
>>>>>        </wsp:Policy>
>>>>> </sp:SignedSupportingTokens>
>>>>>
>>>>> Now i want to deploy a service which requests for Custom tokens from
>>>>> clients. For that i added the custom jars to the axis/lib in
>>>>> tomcat/webapps
>>>>> and above part to the services.xml of the service and deployed it.
>>>>>
>>>>> But it does not generates the wsdl for the service and displays a
>>>>> message
>>>>> "Internal Error" . When i check the tomcat stack trace following
>>>>> exception
>>>>> was found.
>>>>>
>>>>> [INFO] getData request failed for dialect,
>>>>> http://schemas.xmlsoap.org/wsdl/
>>>>> org.apache.axis2.dataretrieval.DataRetrievalException:
>>>>> javax.xml.stream.XMLStrea
>>>>> mException: No open start element, when trying to write end element
>>>>>        at
>>>>> org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLD
>>>>> ataLocator.java:135)
>>>>>        at
>>>>> org.apache.axis2.dataretrieval.WSDLDataLocator.getData(WSDLDataLocato
>>>>> r.java:73)
>>>>> etc...
>>>>>
>>>>> What can be the solution for this.
>>>>> Any suggestion is most welcome.
>>>>>
>>>>> Thanks and regards,
>>>>> shyameniw
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31260403.html
>>>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>>>
>>>>>
>>>>
>>>> <service>
>>>>   <!-- Engage rampart module -->
>>>>   <module ref="rampart"/>
>>>>
>>>>   <!-- What is the class which service is implemented -->
>>>>   <parameter name="ServiceClass"
>>>> locked="false">org.wso2.service.AddService</parameter>
>>>>
>>>>   <!-- Service operations -->
>>>>   <operation name="add">
>>>>     <messageReceiver
>>>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>>>   </operation>
>>>>
>>>>   <!-- Actual service policy -->
>>>>   <wsp:Policy wsu:Id="CustomToken"
>>>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>>>>               xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
>>>> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
>>>>     <wsp:ExactlyOne>
>>>>       <wsp:All>
>>>>             <sp:SignedSupportingTokens>
>>>>                 <wsp:Policy>
>>>>                     <sp:CustomToken
>>>>
>>>> sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
>>>>                         <!--wsp:Policy>
>>>>                             <sp:WssUsernameToken10/>
>>>>                         </wsp:Policy-->
>>>>                     </sp:CustomToken>
>>>>                 </wsp:Policy>
>>>>             </sp:SignedSupportingTokens>
>>>>
>>>>       </wsp:All>
>>>>     </wsp:ExactlyOne>
>>>>
>>>>   </wsp:Policy>
>>>>
>>>> </service>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31264337.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31265006.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Generating WSDL for custom rampart policy token

Posted by Amila Jayasekara <am...@wso2.com>.
Hi Shyameniw,

The wsdl generated in my environment also doesnt show "custom token"
details. I didnt notice this in previous attempt as i was more focused
on the exception. Sorry about that.

About the custom token,
As far as i know, there is no custom token implementation in
rampart-policy. As per now we have builders for UsernameToken,
HttpsToken, IssuedToken, X509Token, SecureConversationToken and
SecurityContextToken. Therefore your custom token will not get
validated at deployment time (If you havent implemented one). I
believe this could be the same reason for not showing custom token in
the WSDL.

Thanks
AmilaJ

On Mon, Mar 28, 2011 at 9:03 PM, shyameniw <sh...@gmail.com> wrote:
>
> Hi Amila,
> When i used your services.xml it generated following wsdl for the policy.
> <wsp:Policy wsu:Id="CustomToken">
>         <wsp:ExactlyOne>
>                 <wsp:All>
>                         <sp:SignedSupportingTokens>
>                                  <wsp:Policy/>
>                         </sp:SignedSupportingTokens>
>                 </wsp:All>
>        </wsp:ExactlyOne>
> </wsp:Policy>
>
> Following is not in the wsdl.
>
> <sp:CustomToken
> sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
> </sp:CustomToken>
>
> This happens to mine's also when i use standard rampart jars. So it should
> be a problem with my implementation of the custom token or deployment of
> custom rampart jars.Can u tell me what are the changes you did in standard
> distribution of axis in tomcat?
>
>
> shyameniw wrote:
>>
>> Hi Amila,
>> I'm using rampart trunk version. I have used your services.xml and
>> generated the wsdl without an error. So what could be the problem here?
>>
>>
>> Amila Jayasekara wrote:
>>>
>>> Hi Shyameniw
>>>
>>> I used attached services xml with a custom token and i was able to
>>> generate WSDL without an error. I used the rampart trunk version. What
>>> is the rampart version you are using ?
>>>
>>> Thanks
>>> AmilaJ
>>>
>>> On Mon, Mar 28, 2011 at 10:25 AM, shyameniw <sh...@gmail.com> wrote:
>>>>
>>>> I have created a new Security Policy token for Rampart say <CustomToken>
>>>> of
>>>> type SignedSupportingToken. It successfully generates a request with
>>>> custom
>>>> tag in the policy.xml
>>>>
>>>> <sp:SignedSupportingTokens
>>>> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
>>>>        <wsp:Policy>
>>>>                <sp:CustomToken
>>>> sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
>>>> />
>>>>        </wsp:Policy>
>>>> </sp:SignedSupportingTokens>
>>>>
>>>> Now i want to deploy a service which requests for Custom tokens from
>>>> clients. For that i added the custom jars to the axis/lib in
>>>> tomcat/webapps
>>>> and above part to the services.xml of the service and deployed it.
>>>>
>>>> But it does not generates the wsdl for the service and displays a
>>>> message
>>>> "Internal Error" . When i check the tomcat stack trace following
>>>> exception
>>>> was found.
>>>>
>>>> [INFO] getData request failed for dialect,
>>>> http://schemas.xmlsoap.org/wsdl/
>>>> org.apache.axis2.dataretrieval.DataRetrievalException:
>>>> javax.xml.stream.XMLStrea
>>>> mException: No open start element, when trying to write end element
>>>>        at
>>>> org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLD
>>>> ataLocator.java:135)
>>>>        at
>>>> org.apache.axis2.dataretrieval.WSDLDataLocator.getData(WSDLDataLocato
>>>> r.java:73)
>>>> etc...
>>>>
>>>> What can be the solution for this.
>>>> Any suggestion is most welcome.
>>>>
>>>> Thanks and regards,
>>>> shyameniw
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31260403.html
>>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>>
>>>>
>>>
>>> <service>
>>>   <!-- Engage rampart module -->
>>>   <module ref="rampart"/>
>>>
>>>   <!-- What is the class which service is implemented -->
>>>   <parameter name="ServiceClass"
>>> locked="false">org.wso2.service.AddService</parameter>
>>>
>>>   <!-- Service operations -->
>>>   <operation name="add">
>>>     <messageReceiver
>>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>>   </operation>
>>>
>>>   <!-- Actual service policy -->
>>>   <wsp:Policy wsu:Id="CustomToken"
>>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>>>               xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
>>> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
>>>     <wsp:ExactlyOne>
>>>       <wsp:All>
>>>             <sp:SignedSupportingTokens>
>>>                 <wsp:Policy>
>>>                     <sp:CustomToken
>>>
>>> sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
>>>                         <!--wsp:Policy>
>>>                             <sp:WssUsernameToken10/>
>>>                         </wsp:Policy-->
>>>                     </sp:CustomToken>
>>>                 </wsp:Policy>
>>>             </sp:SignedSupportingTokens>
>>>
>>>       </wsp:All>
>>>     </wsp:ExactlyOne>
>>>
>>>   </wsp:Policy>
>>>
>>> </service>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31264337.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Generating WSDL for custom rampart policy token

Posted by shyameniw <sh...@gmail.com>.
Hi Amila, 
When i used your services.xml it generated following wsdl for the policy.
<wsp:Policy wsu:Id="CustomToken">
         <wsp:ExactlyOne>
                 <wsp:All>
                         <sp:SignedSupportingTokens>
                                  <wsp:Policy/>
                         </sp:SignedSupportingTokens>
                 </wsp:All>
        </wsp:ExactlyOne>
</wsp:Policy>

Following is not in the wsdl. 

<sp:CustomToken
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
</sp:CustomToken>

This happens to mine's also when i use standard rampart jars. So it should
be a problem with my implementation of the custom token or deployment of
custom rampart jars.Can u tell me what are the changes you did in standard
distribution of axis in tomcat?


shyameniw wrote:
> 
> Hi Amila, 
> I'm using rampart trunk version. I have used your services.xml and
> generated the wsdl without an error. So what could be the problem here?
> 
> 
> Amila Jayasekara wrote:
>> 
>> Hi Shyameniw
>> 
>> I used attached services xml with a custom token and i was able to
>> generate WSDL without an error. I used the rampart trunk version. What
>> is the rampart version you are using ?
>> 
>> Thanks
>> AmilaJ
>> 
>> On Mon, Mar 28, 2011 at 10:25 AM, shyameniw <sh...@gmail.com> wrote:
>>>
>>> I have created a new Security Policy token for Rampart say <CustomToken>
>>> of
>>> type SignedSupportingToken. It successfully generates a request with
>>> custom
>>> tag in the policy.xml
>>>
>>> <sp:SignedSupportingTokens
>>> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
>>>        <wsp:Policy>
>>>                <sp:CustomToken
>>> sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
>>> />
>>>        </wsp:Policy>
>>> </sp:SignedSupportingTokens>
>>>
>>> Now i want to deploy a service which requests for Custom tokens from
>>> clients. For that i added the custom jars to the axis/lib in
>>> tomcat/webapps
>>> and above part to the services.xml of the service and deployed it.
>>>
>>> But it does not generates the wsdl for the service and displays a
>>> message
>>> "Internal Error" . When i check the tomcat stack trace following
>>> exception
>>> was found.
>>>
>>> [INFO] getData request failed for dialect,
>>> http://schemas.xmlsoap.org/wsdl/
>>> org.apache.axis2.dataretrieval.DataRetrievalException:
>>> javax.xml.stream.XMLStrea
>>> mException: No open start element, when trying to write end element
>>>        at
>>> org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLD
>>> ataLocator.java:135)
>>>        at
>>> org.apache.axis2.dataretrieval.WSDLDataLocator.getData(WSDLDataLocato
>>> r.java:73)
>>> etc...
>>>
>>> What can be the solution for this.
>>> Any suggestion is most welcome.
>>>
>>> Thanks and regards,
>>> shyameniw
>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31260403.html
>>> Sent from the Axis - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-user-help@axis.apache.org
>>>
>>>
>> 
>> <service>
>>   <!-- Engage rampart module -->
>>   <module ref="rampart"/>
>> 
>>   <!-- What is the class which service is implemented -->
>>   <parameter name="ServiceClass"
>> locked="false">org.wso2.service.AddService</parameter>
>> 
>>   <!-- Service operations -->
>>   <operation name="add">
>>     <messageReceiver
>> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>>   </operation>
>> 
>>   <!-- Actual service policy -->
>>   <wsp:Policy wsu:Id="CustomToken"
>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>>               xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
>> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
>>     <wsp:ExactlyOne>
>>       <wsp:All>
>>             <sp:SignedSupportingTokens>
>>                 <wsp:Policy>
>>                     <sp:CustomToken
>>                            
>> sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
>>                         <!--wsp:Policy>
>>                             <sp:WssUsernameToken10/>
>>                         </wsp:Policy-->
>>                     </sp:CustomToken>
>>                 </wsp:Policy>
>>             </sp:SignedSupportingTokens>
>> 
>>       </wsp:All>
>>     </wsp:ExactlyOne>
>> 
>>   </wsp:Policy>
>> 
>> </service>
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31264337.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Generating WSDL for custom rampart policy token

Posted by shyameniw <sh...@gmail.com>.
Hi Amila, 
I'm using rampart trunk version. I have used your services.xml and generated
the wsdl without an error. So what could be the problem here?


Amila Jayasekara wrote:
> 
> Hi Shyameniw
> 
> I used attached services xml with a custom token and i was able to
> generate WSDL without an error. I used the rampart trunk version. What
> is the rampart version you are using ?
> 
> Thanks
> AmilaJ
> 
> On Mon, Mar 28, 2011 at 10:25 AM, shyameniw <sh...@gmail.com> wrote:
>>
>> I have created a new Security Policy token for Rampart say <CustomToken>
>> of
>> type SignedSupportingToken. It successfully generates a request with
>> custom
>> tag in the policy.xml
>>
>> <sp:SignedSupportingTokens
>> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
>>        <wsp:Policy>
>>                <sp:CustomToken
>> sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
>> />
>>        </wsp:Policy>
>> </sp:SignedSupportingTokens>
>>
>> Now i want to deploy a service which requests for Custom tokens from
>> clients. For that i added the custom jars to the axis/lib in
>> tomcat/webapps
>> and above part to the services.xml of the service and deployed it.
>>
>> But it does not generates the wsdl for the service and displays a message
>> "Internal Error" . When i check the tomcat stack trace following
>> exception
>> was found.
>>
>> [INFO] getData request failed for dialect,
>> http://schemas.xmlsoap.org/wsdl/
>> org.apache.axis2.dataretrieval.DataRetrievalException:
>> javax.xml.stream.XMLStrea
>> mException: No open start element, when trying to write end element
>>        at
>> org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLD
>> ataLocator.java:135)
>>        at
>> org.apache.axis2.dataretrieval.WSDLDataLocator.getData(WSDLDataLocato
>> r.java:73)
>> etc...
>>
>> What can be the solution for this.
>> Any suggestion is most welcome.
>>
>> Thanks and regards,
>> shyameniw
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31260403.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>>
> 
> <service>
>   <!-- Engage rampart module -->
>   <module ref="rampart"/>
> 
>   <!-- What is the class which service is implemented -->
>   <parameter name="ServiceClass"
> locked="false">org.wso2.service.AddService</parameter>
> 
>   <!-- Service operations -->
>   <operation name="add">
>     <messageReceiver
> class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>   </operation>
> 
>   <!-- Actual service policy -->
>   <wsp:Policy wsu:Id="CustomToken"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>               xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
> xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
>     <wsp:ExactlyOne>
>       <wsp:All>
>             <sp:SignedSupportingTokens>
>                 <wsp:Policy>
>                     <sp:CustomToken
>                            
> sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
>                         <!--wsp:Policy>
>                             <sp:WssUsernameToken10/>
>                         </wsp:Policy-->
>                     </sp:CustomToken>
>                 </wsp:Policy>
>             </sp:SignedSupportingTokens>
> 
>       </wsp:All>
>     </wsp:ExactlyOne>
> 
>   </wsp:Policy>
> 
> </service>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
> 

-- 
View this message in context: http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31263879.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Generating WSDL for custom rampart policy token

Posted by Amila Jayasekara <am...@wso2.com>.
Hi Shyameniw

I used attached services xml with a custom token and i was able to
generate WSDL without an error. I used the rampart trunk version. What
is the rampart version you are using ?

Thanks
AmilaJ

On Mon, Mar 28, 2011 at 10:25 AM, shyameniw <sh...@gmail.com> wrote:
>
> I have created a new Security Policy token for Rampart say <CustomToken> of
> type SignedSupportingToken. It successfully generates a request with custom
> tag in the policy.xml
>
> <sp:SignedSupportingTokens
> xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
>        <wsp:Policy>
>                <sp:CustomToken
> sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"
> />
>        </wsp:Policy>
> </sp:SignedSupportingTokens>
>
> Now i want to deploy a service which requests for Custom tokens from
> clients. For that i added the custom jars to the axis/lib in tomcat/webapps
> and above part to the services.xml of the service and deployed it.
>
> But it does not generates the wsdl for the service and displays a message
> "Internal Error" . When i check the tomcat stack trace following exception
> was found.
>
> [INFO] getData request failed for dialect, http://schemas.xmlsoap.org/wsdl/
> org.apache.axis2.dataretrieval.DataRetrievalException:
> javax.xml.stream.XMLStrea
> mException: No open start element, when trying to write end element
>        at
> org.apache.axis2.dataretrieval.WSDLDataLocator.outputInlineForm(WSDLD
> ataLocator.java:135)
>        at
> org.apache.axis2.dataretrieval.WSDLDataLocator.getData(WSDLDataLocato
> r.java:73)
> etc...
>
> What can be the solution for this.
> Any suggestion is most welcome.
>
> Thanks and regards,
> shyameniw
>
>
> --
> View this message in context: http://old.nabble.com/Generating-WSDL-for-custom-rampart-policy-token-tp31260403p31260403.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>