You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Sam Carleton <sc...@miltonstreet.com> on 2009/03/29 04:13:15 UTC

.net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

As I posted a few hours ago, I am working on my first ever web
service.  The server, Apache and Axis2/C of course, the client is a
C#.Net application.

I have the server compiled and it shows up when I consult the list of
services on the Apache web server.  I built a C# client to call the
Web Service and an exception was thrown:

DLL description has invalid state of not having valid DLL create
function, of valid delete function or valid dll_handler

I did some searching and found that it is an error from Axis2/C:
AXIS2_ERROR_INVALID_STATE_DLL_DESC

I am clueless at what the problem is.

One thing, which I don't know if it is related is this concept of "the
wrapped convention".  I have Tong Ka Iok's book "Developing Web
Services with Apache Axis2" that is Java based.  In chapter 5 he talks
about wrapping the web service so that it appears to the client like a
normal function rather then taking one object and returning another.
He goes on at the end of the chapter and state that .Net requires
services to be wrapped.  In the middle of the chapter it looks like he
had to do some thing to setup Axis2 to handle the wrapped service, but
it looks like it is Java related.  Is there anything special I need to
do for Axis2/C to wrap a service?  Being new at this whole thing, I
hope it is ok, but I am going to attach my WSDL, too, just to make
sure I have it wrapped correct.

Sam

Re: .net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

Posted by Supun Kamburugamuva <su...@gmail.com>.
Your service DLL is not loaded by Axis2/C becuase the functions that it
looks for initializing the DLL, is not exported. Instead of using
AXiS2_EXTERN use AXIS2_EXPORT for the axis2_get_instance and
axis2_remove_instace functions. This should solve your problem.

Supun.

On Sun, Mar 29, 2009 at 10:52 AM, Sam Carleton <sc...@gmail.com> wrote:

> I am looking more into the log file and I am finding something
> interesting.  I have a debug message "loading the services from
> msg_recv_load_and_init_svc" for all the services EXCEPT mine.  Here is what
> I am getting in my log file:
>
> [Sun Mar 29 01:40:58 2009] [debug] ..\..\src\core\receivers\msg_recv.c(131)
> loading the services from msg_recv_load_and_init_svc
> [Sun Mar 29 01:40:58 2009] [info]  [Axis2] Axis2 worker created
> [Sun Mar 29 01:41:08 2009] [debug]
> ..\..\src\core\transport\http\server\apache2\apache2_worker.c(238)
> http://localhost:8042/axis2/services/NodeManager
> [Sun Mar 29 01:41:08 2009] [debug]
> ..\..\src\core\transport\http\server\apache2\apache2_worker.c(280) Client
> HTTP version HTTP/1.1
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\axiom\src\soap\soap_builder.c(930)
> Identified soap version is soap11
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler request_uri_based_dispatcher within the phase Transport
> [Sun Mar 29 01:41:08 2009] [debug]
> ..\..\src\core\engine\req_uri_disp.c(100) Checking for service using target
> endpoint address : http://localhost:8042/axis2/services/NodeManager
> [Sun Mar 29 01:41:08 2009] [debug]
> ..\..\src\core\engine\req_uri_disp.c(121) Service found using target
> endpoint address
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler AddressingInHandler within the phase Transport
> [Sun Mar 29 01:41:08 2009] [info]  Starting addressing in handler
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler addressing_based_dispatcher within the phase Transport
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler rest_dispatcher within the phase Dispatch
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler soap_message_body_based_dispatcher within the phase
> Dispatch
> [Sun Mar 29 01:41:08 2009] [debug]
> ..\..\src\core\engine\soap_body_disp.c(231) Checking for operation using
> SOAP messagebody's first child's local name : getChildren
> [Sun Mar 29 01:41:08 2009] [debug]
> ..\..\src\core\engine\soap_body_disp.c(240) Operation found using SOAP
> message body's first child's local name
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler soap_action_based_dispatcher within the phase Dispatch
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler dispatch_post_conditions_evaluator within the phase
> PostDispatch
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler context_handler within the phase PostDispatch
> [Sun Mar 29 01:41:08 2009] [error]
> ..\..\src\core\receivers\raw_xml_in_out_msg_recv.c(115) Impl object for
> service 'NodeManager' not set in message receiver. 107 :: DLL description
> has invalid state of not having valid DLL create function,         of valid
> delete function or valid dll_handler
> [Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210)
> Invoke the handler AddressingOutHandler within the phase MessageOut
> [Sun Mar 29 01:41:08 2009] [info]  Starting addressing out handler
> [Sun Mar 29 01:41:08 2009] [debug]
> ..\..\src\modules\mod_addr\addr_out_handler.c(133) No action present. Stop
> processing addressing
>
> ----------------------------
> My WSDL
> ----------------------------
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="urn:mmpp:nodemanager" xmlns:wsdl="
> http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema" name="NodeManager"
> targetNamespace="urn:mmpp:nodemanager">
>   <wsdl:types>
>     <xsd:schema targetNamespace="urn:mmpp:nodemanager">
>
>       <xsd:element name="getChildren">
>         <xsd:complexType>
>           <xsd:sequence>
>               <xsd:element name="nodeId" type="xsd:string" />
>               <xsd:element name="userId" type="xsd:string"></xsd:element>
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>
>       <xsd:element name="getChildrenResponse">
>         <xsd:complexType>
>           <xsd:sequence>
>               <xsd:element name="isImageGallery" type="xsd:boolean" />
>               <xsd:element name="node" type="tns:NodeType"
> maxOccurs="unbounded" minOccurs="0"></xsd:element>
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>
>       <xsd:complexType name="NodeType">
>           <xsd:attribute name="nodeId" type="xsd:string"></xsd:attribute>
>           <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
>       </xsd:complexType>
>     </xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="getChildrenRequest">
>     <wsdl:part element="tns:getChildren" name="parameters"/>
>   </wsdl:message>
>   <wsdl:message name="getChildrenResponse">
>     <wsdl:part element="tns:getChildrenResponse" name="parameters"/>
>   </wsdl:message>
>   <wsdl:portType name="NodeManager">
>     <wsdl:operation name="getChildren">
>       <wsdl:input message="tns:getChildrenRequest"/>
>       <wsdl:output message="tns:getChildrenResponse"/>
>     </wsdl:operation>
>
>   </wsdl:portType>
>
>   <wsdl:binding name="NodeManagerSOAP" type="tns:NodeManager">
>     <soap:binding style="document" transport="
> http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="getChildren">
>       <soap:operation soapAction="urn:mmpp:nodemanager/NewOperation"/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="NodeManager">
>     <wsdl:port binding="tns:NodeManagerSOAP" name="NodeManagerSOAP">
>       <soap:address location="http://localhost/axis2/services/NodeManager
> "/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>
>
>


-- 
Software Engineer, WSO2 Inc
http://wso2.org
supunk.blogspot.com

Re: .net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

Posted by Sam Carleton <sc...@gmail.com>.
I am looking more into the log file and I am finding something interesting.
I have a debug message "loading the services from
msg_recv_load_and_init_svc" for all the services EXCEPT mine.  Here is what
I am getting in my log file:

[Sun Mar 29 01:40:58 2009] [debug] ..\..\src\core\receivers\msg_recv.c(131)
loading the services from msg_recv_load_and_init_svc
[Sun Mar 29 01:40:58 2009] [info]  [Axis2] Axis2 worker created
[Sun Mar 29 01:41:08 2009] [debug]
..\..\src\core\transport\http\server\apache2\apache2_worker.c(238)
http://localhost:8042/axis2/services/NodeManager
[Sun Mar 29 01:41:08 2009] [debug]
..\..\src\core\transport\http\server\apache2\apache2_worker.c(280) Client
HTTP version HTTP/1.1
[Sun Mar 29 01:41:08 2009] [debug] ..\..\axiom\src\soap\soap_builder.c(930)
Identified soap version is soap11
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler request_uri_based_dispatcher within the phase Transport
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\req_uri_disp.c(100)
Checking for service using target endpoint address :
http://localhost:8042/axis2/services/NodeManager
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\req_uri_disp.c(121)
Service found using target endpoint address
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler AddressingInHandler within the phase Transport
[Sun Mar 29 01:41:08 2009] [info]  Starting addressing in handler
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler addressing_based_dispatcher within the phase Transport
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler rest_dispatcher within the phase Dispatch
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler soap_message_body_based_dispatcher within the phase Dispatch
[Sun Mar 29 01:41:08 2009] [debug]
..\..\src\core\engine\soap_body_disp.c(231) Checking for operation using
SOAP messagebody's first child's local name : getChildren
[Sun Mar 29 01:41:08 2009] [debug]
..\..\src\core\engine\soap_body_disp.c(240) Operation found using SOAP
message body's first child's local name
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler soap_action_based_dispatcher within the phase Dispatch
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler dispatch_post_conditions_evaluator within the phase PostDispatch
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler context_handler within the phase PostDispatch
[Sun Mar 29 01:41:08 2009] [error]
..\..\src\core\receivers\raw_xml_in_out_msg_recv.c(115) Impl object for
service 'NodeManager' not set in message receiver. 107 :: DLL description
has invalid state of not having valid DLL create function,         of valid
delete function or valid dll_handler
[Sun Mar 29 01:41:08 2009] [debug] ..\..\src\core\engine\phase.c(210) Invoke
the handler AddressingOutHandler within the phase MessageOut
[Sun Mar 29 01:41:08 2009] [info]  Starting addressing out handler
[Sun Mar 29 01:41:08 2009] [debug]
..\..\src\modules\mod_addr\addr_out_handler.c(133) No action present. Stop
processing addressing

----------------------------
My WSDL
----------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="urn:mmpp:nodemanager" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" name="NodeManager"
targetNamespace="urn:mmpp:nodemanager">
  <wsdl:types>
    <xsd:schema targetNamespace="urn:mmpp:nodemanager">

      <xsd:element name="getChildren">
        <xsd:complexType>
          <xsd:sequence>
              <xsd:element name="nodeId" type="xsd:string" />
              <xsd:element name="userId" type="xsd:string"></xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:element name="getChildrenResponse">
        <xsd:complexType>
          <xsd:sequence>
              <xsd:element name="isImageGallery" type="xsd:boolean" />
              <xsd:element name="node" type="tns:NodeType"
maxOccurs="unbounded" minOccurs="0"></xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:complexType name="NodeType">
          <xsd:attribute name="nodeId" type="xsd:string"></xsd:attribute>
          <xsd:attribute name="name" type="xsd:string"></xsd:attribute>
      </xsd:complexType>
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="getChildrenRequest">
    <wsdl:part element="tns:getChildren" name="parameters"/>
  </wsdl:message>
  <wsdl:message name="getChildrenResponse">
    <wsdl:part element="tns:getChildrenResponse" name="parameters"/>
  </wsdl:message>
  <wsdl:portType name="NodeManager">
    <wsdl:operation name="getChildren">
      <wsdl:input message="tns:getChildrenRequest"/>
      <wsdl:output message="tns:getChildrenResponse"/>
    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="NodeManagerSOAP" type="tns:NodeManager">
    <soap:binding style="document" transport="
http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getChildren">
      <soap:operation soapAction="urn:mmpp:nodemanager/NewOperation"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="NodeManager">
    <wsdl:port binding="tns:NodeManagerSOAP" name="NodeManagerSOAP">
      <soap:address location="http://localhost/axis2/services/NodeManager"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Re: .net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

Posted by Sam Carleton <sc...@gmail.com>.
On Sat, Mar 28, 2009 at 11:15 PM, Rajika Kumarasiri <ra...@gmail.com> wrote:
>
> Well what I was asking is weather you have implemented the axis2_get_instance and axis2_remove_instance function
> properly. I don't know weather the codegen tool generate these two functions.

Ok, I follow you.  VC9 (Visual Studio 2008) did not like the
AXIS2_EXTERN being on the actual implementations of the function, so I
am prototyping the functions in the same file they are declared with
the AXIS2_EXTERN, otherwise they are exactly what the code generator
created:

AXIS2_EXTERN int axis2_get_instance(struct axis2_svc_skeleton **inst,
const axutil_env_t *env);
AXIS2_EXTERN int axis2_remove_instance(axis2_svc_skeleton_t *inst,
const axutil_env_t *env);

int axis2_get_instance(struct axis2_svc_skeleton **inst, const
axutil_env_t *env)
{
	*inst = axis2_svc_skel_NodeManager_create(env);

	if(!(*inst))
	{
		return AXIS2_FAILURE;
	}

	return AXIS2_SUCCESS;
}

int axis2_remove_instance(axis2_svc_skeleton_t *inst, const axutil_env_t *env)
{
	axis2_status_t status = AXIS2_FAILURE;
	if (inst)
	{
		status = AXIS2_SVC_SKELETON_FREE(inst, env);
	}
	return status;
}

Re: .net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

Posted by Rajika Kumarasiri <ra...@gmail.com>.
Well what I was asking is weather you have implemented the
axis2_get_instance and axis2_remove_instance function
properly. I don't know weather the codegen tool generate these two
functions.

-Rajika

On Sun, Mar 29, 2009 at 8:25 AM, Sam Carleton <sc...@gmail.com> wrote:

> On Sat, Mar 28, 2009 at 10:40 PM, Rajika Kumarasiri <ra...@gmail.com>
> wrote:
> > Seems like something wrong with your service dll. Please re-check the
> > service implementation.
>
> Rajika,
>
> Are you saying there is something wrong in my function where I
> implement the NodeManager::getChildren function:
> axis2_skel_NodeManager_getChildren()
>
> Or are you saying that the issue is somewhere else?  I am using the
> WSDL2C from Axis2/Java 1.4.1 to generate most of the code, I am only
> implementing axis2_skel_NodeManager_getChildren().
>
> Sam
>



-- 
http://wso2.org/
http://llvm.org/
http://www.osdev.org/

Re: .net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

Posted by Sam Carleton <sc...@gmail.com>.
On Sat, Mar 28, 2009 at 10:40 PM, Rajika Kumarasiri <ra...@gmail.com> wrote:
> Seems like something wrong with your service dll. Please re-check the
> service implementation.

Rajika,

Are you saying there is something wrong in my function where I
implement the NodeManager::getChildren function:
axis2_skel_NodeManager_getChildren()

Or are you saying that the issue is somewhere else?  I am using the
WSDL2C from Axis2/Java 1.4.1 to generate most of the code, I am only
implementing axis2_skel_NodeManager_getChildren().

Sam

Re: .net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

Posted by Rajika Kumarasiri <ra...@gmail.com>.
Seems like something wrong with your service dll. Please re-check the
service implementation.

-Rajika

On Sun, Mar 29, 2009 at 7:53 AM, Sam Carleton <sc...@gmail.com> wrote:

> On Sat, Mar 28, 2009 at 10:16 PM, Rajika Kumarasiri <ra...@gmail.com>
> wrote:
> > What does the axis2 server log says?
>
> ..\..\src\core\receivers\raw_xml_in_out_msg_recv.c(115) Impl object
> for service 'NodeManager' not set in message receiver. 107 :: DLL
> description has invalid state of not having valid DLL create function,
>        of valid delete function or valid dll_handler
>
> I don't know what it mean :(
>
> Sam
>



-- 
http://wso2.org/
http://llvm.org/
http://www.osdev.org/

Re: .net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

Posted by Sam Carleton <sc...@gmail.com>.
On Sat, Mar 28, 2009 at 10:16 PM, Rajika Kumarasiri <ra...@gmail.com> wrote:
> What does the axis2 server log says?

..\..\src\core\receivers\raw_xml_in_out_msg_recv.c(115) Impl object
for service 'NodeManager' not set in message receiver. 107 :: DLL
description has invalid state of not having valid DLL create function,
        of valid delete function or valid dll_handler

I don't know what it mean :(

Sam

Re: .net wrapping and AXIS2_ERROR_INVALID_STATE_DLL_DESC

Posted by Rajika Kumarasiri <ra...@gmail.com>.
What does the axis2 server log says?

-Rajika

On Sun, Mar 29, 2009 at 7:43 AM, Sam Carleton <sc...@miltonstreet.com>wrote:

> As I posted a few hours ago, I am working on my first ever web
> service.  The server, Apache and Axis2/C of course, the client is a
> C#.Net application.
>
> I have the server compiled and it shows up when I consult the list of
> services on the Apache web server.  I built a C# client to call the
> Web Service and an exception was thrown:
>
> DLL description has invalid state of not having valid DLL create
> function, of valid delete function or valid dll_handler
>
> I did some searching and found that it is an error from Axis2/C:
> AXIS2_ERROR_INVALID_STATE_DLL_DESC
>
> I am clueless at what the problem is.
>
> One thing, which I don't know if it is related is this concept of "the
> wrapped convention".  I have Tong Ka Iok's book "Developing Web
> Services with Apache Axis2" that is Java based.  In chapter 5 he talks
> about wrapping the web service so that it appears to the client like a
> normal function rather then taking one object and returning another.
> He goes on at the end of the chapter and state that .Net requires
> services to be wrapped.  In the middle of the chapter it looks like he
> had to do some thing to setup Axis2 to handle the wrapped service, but
> it looks like it is Java related.  Is there anything special I need to
> do for Axis2/C to wrap a service?  Being new at this whole thing, I
> hope it is ok, but I am going to attach my WSDL, too, just to make
> sure I have it wrapped correct.
>
> Sam
>



-- 
http://wso2.org/
http://llvm.org/
http://www.osdev.org/