You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Dmytro Dyachuk (JIRA)" <ax...@ws.apache.org> on 2005/05/03 03:03:04 UTC

[jira] Created: (AXIS-1972) The options specified in a deploy file cannot be accessed with JavaProvider

The options specified in a deploy file cannot be accessed with JavaProvider
---------------------------------------------------------------------------

         Key: AXIS-1972
         URL: http://issues.apache.org/jira/browse/AXIS-1972
     Project: Axis
        Type: Bug
  Components: Basic Architecture  
    Versions: 1.2RC2    
 Environment: JDK 1.5.0_02-b09, Tomcat 5.0
    Reporter: Dmytro Dyachuk
    Priority: Blocker





I have the handler which inherits BasicHandler(used with JavaProvider), but the options field is always null(not initialized) and so there is not way of accessing the options specified in deploy-file. 

-piece of code which causes problems 
public Proxy() {
		super();
		EndPointService = (String)getOption("EndpointService"); //throws exception
		System.out.println(getOptions()==null); //returns true;
}

-part of the deploy.wsdd

 <service name="ScheduledProxy" provider="Handler">
  <parameter name="handlerClass" value="WSP.ScheduledProxy"/>
  <parameter name="scope" value="application"/>
  <parameter name="EndpointService" value="http://someURL:8080/axis/services/DBWebService"/>
  <parameter name="Schedule" value = "true"/>  
 </service> 



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1972) The options specified in a deploy file cannot be accessed with JavaProvider

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1972?page=comments#action_65825 ]
     
Jayachandra Sekhara Rao Sunkara commented on AXIS-1972:
-------------------------------------------------------

Hi Dmytro!
Your described mappings will not be featuring as options.
The way you described your wsdd makes the EndpointService and others appear as parameters of the WSDDService. If you want to get hold of this mapping information, I'd suggest you code in your custom handler something like...

{
  WSDDService myWSDDService
  (get hold of the corresponding WSDDService object and assign it to myWSDDService)
  ...
  ...
  ...
  EndPointService = myWSDDservice.getParameter("EndpointService");
  ...
}

Thank you,
Jayachandra

P.S:: I had tough time understanding your question, if this doesn't solve your problem, in your next post can you be precise on what you are trying to do. I've assumed that you wrote a custom provider handler extending JavaProvider and in one of the methods Proxy() of that handler you tried to access the deployment information you see in the server-config.wsdd

> The options specified in a deploy file cannot be accessed with JavaProvider
> ---------------------------------------------------------------------------
>
>          Key: AXIS-1972
>          URL: http://issues.apache.org/jira/browse/AXIS-1972
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2RC2
>  Environment: JDK 1.5.0_02-b09, Tomcat 5.0
>     Reporter: Dmytro Dyachuk
>     Priority: Blocker

>
> I have the handler which inherits BasicHandler(used with JavaProvider), but the options field is always null(not initialized) and so there is not way of accessing the options specified in deploy-file. 
> -piece of code which causes problems 
> public Proxy() {
> 		super();
> 		EndPointService = (String)getOption("EndpointService"); //throws exception
> 		System.out.println(getOptions()==null); //returns true;
> }
> -part of the deploy.wsdd
>  <service name="ScheduledProxy" provider="Handler">
>   <parameter name="handlerClass" value="WSP.ScheduledProxy"/>
>   <parameter name="scope" value="application"/>
>   <parameter name="EndpointService" value="http://someURL:8080/axis/services/DBWebService"/>
>   <parameter name="Schedule" value = "true"/>  
>  </service> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1972) The options specified in a deploy file cannot be accessed with JavaProvider

Posted by "Brian Nielsen (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1972?page=comments#action_65469 ]
     
Brian Nielsen commented on AXIS-1972:
-------------------------------------

I'm no whizz, but I think you need to declare the handler and the parameter explicitly, in other words you're handler can't get options from the service "wsdd-scope".

As an example, I have a handler that i use for validation, and I've configured i in the wsdd like:

<service name="..." style="document">
  <requestFlow>
    <handler type="java:dk.oio.xml.axis.handler.ValidationHandler" >
      <parameter name="schemaLocation" value="http://rep.oio.dk/cpr.dk/xml/schemas/core/2002/06/28/CPR_CivilRegistrationNumber.xsd"/>
    </handler>
  </requestflow>
</service>

and I have no problem, so you should have something like:

<service name="ScheduledProxy" provider="Handler">
  <parameter name="handlerClass" value="WSP.ScheduledProxy"/>
  <parameter name="scope" value="application"/>
  <parameter name="Schedule" value = "true"/>
  <requestFlow>
   <handler type="java:<your package>.Proxy" >
      <parameter name="EndpointService" value="http://someURL:8080/axis/services/DBWebService"/>
    </handler>
  </requestFlow>
</service>

Regards Brian




> The options specified in a deploy file cannot be accessed with JavaProvider
> ---------------------------------------------------------------------------
>
>          Key: AXIS-1972
>          URL: http://issues.apache.org/jira/browse/AXIS-1972
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2RC2
>  Environment: JDK 1.5.0_02-b09, Tomcat 5.0
>     Reporter: Dmytro Dyachuk
>     Priority: Blocker

>
> I have the handler which inherits BasicHandler(used with JavaProvider), but the options field is always null(not initialized) and so there is not way of accessing the options specified in deploy-file. 
> -piece of code which causes problems 
> public Proxy() {
> 		super();
> 		EndPointService = (String)getOption("EndpointService"); //throws exception
> 		System.out.println(getOptions()==null); //returns true;
> }
> -part of the deploy.wsdd
>  <service name="ScheduledProxy" provider="Handler">
>   <parameter name="handlerClass" value="WSP.ScheduledProxy"/>
>   <parameter name="scope" value="application"/>
>   <parameter name="EndpointService" value="http://someURL:8080/axis/services/DBWebService"/>
>   <parameter name="Schedule" value = "true"/>  
>  </service> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXIS-1972) The options specified in a deploy file cannot be accessed with JavaProvider

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1972?page=all ]
     
Tom Jordahl closed AXIS-1972:
-----------------------------

    Resolution: Invalid

closed per Dmytro's comment.

> The options specified in a deploy file cannot be accessed with JavaProvider
> ---------------------------------------------------------------------------
>
>          Key: AXIS-1972
>          URL: http://issues.apache.org/jira/browse/AXIS-1972
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2RC2
>  Environment: JDK 1.5.0_02-b09, Tomcat 5.0
>     Reporter: Dmytro Dyachuk
>     Priority: Blocker

>
> I have the handler which inherits BasicHandler(used with JavaProvider), but the options field is always null(not initialized) and so there is not way of accessing the options specified in deploy-file. 
> -piece of code which causes problems 
> public Proxy() {
> 		super();
> 		EndPointService = (String)getOption("EndpointService"); //throws exception
> 		System.out.println(getOptions()==null); //returns true;
> }
> -part of the deploy.wsdd
>  <service name="ScheduledProxy" provider="Handler">
>   <parameter name="handlerClass" value="WSP.ScheduledProxy"/>
>   <parameter name="scope" value="application"/>
>   <parameter name="EndpointService" value="http://someURL:8080/axis/services/DBWebService"/>
>   <parameter name="Schedule" value = "true"/>  
>  </service> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1972) The options specified in a deploy file cannot be accessed with JavaProvider

Posted by "Dmytro Dyachuk (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1972?page=comments#action_65729 ]
     
Dmytro Dyachuk commented on AXIS-1972:
--------------------------------------

The thing is that, I'm using my own class as the provider, and for a service, and when I'm trying to obtain the options, they are null (the hash table is not initialized). Then the Axis the creates my the instance of the my class, it doesn't initialize the hastable with options. This bug is present only in the case whem I declare my handlers as the provider.

---
public Proxy() {
super();
EndPointService = (String)getOption("EndpointService"); //throws exception
System.out.println(getOptions()==null); //returns true;
}

-part of the deploy.wsdd

 <service name="Proxy" provider="Handler"> 
  <parameter name="handlerClass" value="WSP.Proxy"/>
  <parameter name="scope" value="application"/>
  <parameter name="EndpointService" value="http://someURL:8080/axis/services/DBWebService"/>
  <parameter name="Schedule" value = "true"/>
 </service>

> The options specified in a deploy file cannot be accessed with JavaProvider
> ---------------------------------------------------------------------------
>
>          Key: AXIS-1972
>          URL: http://issues.apache.org/jira/browse/AXIS-1972
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2RC2
>  Environment: JDK 1.5.0_02-b09, Tomcat 5.0
>     Reporter: Dmytro Dyachuk
>     Priority: Blocker

>
> I have the handler which inherits BasicHandler(used with JavaProvider), but the options field is always null(not initialized) and so there is not way of accessing the options specified in deploy-file. 
> -piece of code which causes problems 
> public Proxy() {
> 		super();
> 		EndPointService = (String)getOption("EndpointService"); //throws exception
> 		System.out.println(getOptions()==null); //returns true;
> }
> -part of the deploy.wsdd
>  <service name="ScheduledProxy" provider="Handler">
>   <parameter name="handlerClass" value="WSP.ScheduledProxy"/>
>   <parameter name="scope" value="application"/>
>   <parameter name="EndpointService" value="http://someURL:8080/axis/services/DBWebService"/>
>   <parameter name="Schedule" value = "true"/>  
>  </service> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1972) The options specified in a deploy file cannot be accessed with JavaProvider

Posted by "Dmytro Dyachuk (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1972?page=comments#action_66403 ]
     
Dmytro Dyachuk commented on AXIS-1972:
--------------------------------------

The problem is solved. The thing was that I should inherit class BasicProvider instead of BasicHandler. and I shoud overrride the method initServiceDesc in the following way:

public void initServiceDesc(SOAPService arg0, MessageContext arg1) throws AxisFault {
		EndPointService = (String) arg0.getOption("EndpointService");
}

Invocation of the this. getOption() as will return null's all the time as the hashtable with the Options is not initialized. 


Thx. 
Dmytro.




 


> The options specified in a deploy file cannot be accessed with JavaProvider
> ---------------------------------------------------------------------------
>
>          Key: AXIS-1972
>          URL: http://issues.apache.org/jira/browse/AXIS-1972
>      Project: Axis
>         Type: Bug
>   Components: Basic Architecture
>     Versions: 1.2RC2
>  Environment: JDK 1.5.0_02-b09, Tomcat 5.0
>     Reporter: Dmytro Dyachuk
>     Priority: Blocker

>
> I have the handler which inherits BasicHandler(used with JavaProvider), but the options field is always null(not initialized) and so there is not way of accessing the options specified in deploy-file. 
> -piece of code which causes problems 
> public Proxy() {
> 		super();
> 		EndPointService = (String)getOption("EndpointService"); //throws exception
> 		System.out.println(getOptions()==null); //returns true;
> }
> -part of the deploy.wsdd
>  <service name="ScheduledProxy" provider="Handler">
>   <parameter name="handlerClass" value="WSP.ScheduledProxy"/>
>   <parameter name="scope" value="application"/>
>   <parameter name="EndpointService" value="http://someURL:8080/axis/services/DBWebService"/>
>   <parameter name="Schedule" value = "true"/>  
>  </service> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira