users@jax-ws.java.net

Re: for error of add web service in NetBean

From: yuyin Song <yuyinsong_at_yahoo.com>
Date: Mon, 24 Jul 2006 08:32:54 -0700 (PDT)

Hi Sameer,

It can be successfully built.
Please go ahead, deploy services, add service (expose
service, or add registry), the error I described
before will be generated. The error is describedas :
exception=modeler error: invalid entity name:
ReadServiceRequest. See what the problem is. Thanks a
lot,

Yuyin


--- Sameer Tyagi <Sameer.Tyagi_at_Sun.COM> wrote:


---------------------------------
    I did a quick test, looks like you are missing a
schema file

SmartTransducerML.xsd (The system cannot find the file
specified)
However it seems this schema is not used anywhere in
the WSDL. When Icomment
out the line referencing it in the WSDL it works fine.

wsimport-init:
Created
dir:F:\workspace\JavaApplication3\build\generated\wsimport\client
Created dir:
F:\workspace\JavaApplication3\build\classes
wsimport-client-check-SmartTransducerServices:
wsimport-client-SmartTransducerServices:
Note:F:\workspace\JavaApplication3\build\generated\wsimport\client\test\ObjectFactory.javauses
unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
BUILD SUCCESSFUL (total time: 8 seconds)

/s




yuyin Song wrote:
Hi Sameer,Please find my wsdl and schema files in
theattachment(wsdl.piz). You should rename wsdl.piz
intowsdl.zip and then extend them. Please try it and
seewhat the problem is. Thank you so
much.Regards,Yuyin--- Sameer Tyagi
<Sameer.Tyagi_at_Sun.COM> wrote:
      
I m not sure I understand but if you
additionallyinclude the schemas in the WAR andhave the
WSDL point to the schemas relatively thisshould work.
For example the WSDL shouldhave something
like<xsd:importnamespace="http://localhost/SmartTransducerServices"schemaLocation="ReadServiceRequest.xsd"/>
 Look at the examples (though a bit dated ) here
    
http://java.sun.com/developer/technicalArticles/xml/jaxrpcpatterns3/
 
      
Hope this helps/syuyin Song wrote:
          
Hi Sameer,Thanks. I think that problem is about
location ofschema file in the xs:import. for example,
    
        
<xs:importnamespace="http://localhost/SmartTransducerServices"
   
          
schemaLocation="ReadServiceRequest.xsd"/>.This is
relatve location, not a absolutely
        
location.
          
Actually I use wsdl file in the directory
        
C:\Documents
          
and
Settings\EugeneSong\WSDL\SmartTransducerServices.wsdl,
thisdirectiory also includes all XML schema file
        
related
          
to wsdl file.I use the same as
        
targetNamespace="http://localhost/SmartTransducerServices
   
          
for all XML schema files and wsdl file.When I use this
wsdl file to generate web service,
        
the
          
new wsdl file and all XML schema files are
        
generated
          
respectively in the directory:C:\Documents and
Settings\EugeneSong\SmartTransducerServices\web\WEB-INF\wsdl
andC:\Documents and
Settings\EugeneSong\SmartTransducerServices\build\web\WEB-INF\wsdlWhen
I successfully depoly web service, It
        
correctly
          
display wsdl file in the web
        
site:http://localhost:8080/SmartTransducerServices/SmartTransducerServices?WSDL.
   
          
But the location of XML schema file in this wsdl
        
file
          
is changed into the following. <xsd:import
        
namespace="http://localhost/SmartTransducerServices"schemaLocation="http://sdage8.sensor.intranet:8080/SmartTransducerServices/SmartTransducerServices/__container$publishing$subctx/WEB-INF/wsdl/ReadServiceRequest.xsd"
   
          
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:xsd="http://www.w3.org/2001/XMLSchema"
/> When I add web service from wsdl in this web
        
address,
          
Web Server can not find the schema file. That is
        
main
          
problem. I hope that my description is clear.
Myquestion is how to set the location of XML schema
  
        
file
          
in the wsdl for my special case? Thanks a
lot.Regards,Yuyin--- Sameer Tyagi
<Sameer.Tyagi_at_Sun.COM> wrote:
              
There is a problem with the WSDL you are using. Itmay
be because it has schemas thatit references that are
not packaged with it.Can you attach your wsdl here
?/syuyin Song wrote:
                  
Hi Jitu,Thanks. I tried to use NetBean 5.5. It looks
like
                
not
                  
support web service generated from WSDL. When wecreate
web service, the options do not include
                      
web
                            
services generated from WSDL. I am not sure why,
        
                
and
                  
feel strange. Actually, NetBean has supported
webservice generated from WSDL. That is why I used
          
                
NetBet
                  
5.0 not 5.5. What is your idea for that?My problem is
error for add service. I
                      
successfully
                            
deploy web service and display web page:

                            
http://localhost/SmartTransducerServices/build/web/WEB-INF/wsdl/SmartTransducerServices?wsdl
     
              
           
                  
When I add web service in rumtime, the
errorinformation was generated as follows:Approach 1:
Add service using local wsdl fileC:/Documents and
Settings/Eugene
                            
Song/SmartTransducerServices/web/WEB-INF/wsdl/SmartTransducerServices.wsdl
     
              
           
                  
The error information is as foloows:
                            
http://localhost:8080/SmartTransducerServices/SmartTransducerServices?WSDL
     
              
           
                  
Start file:///C:\Documents and Settings\Eugene
      
                            
Song\SmartTransducerServices\web\WEB-INF\wsdl\SmartTransducerServices.wsdl
     
              
           
                  
07/21/2006 09:17:09: Parsing WSDL. Please wait
      
                
..WSDL
                  
- file:/C:/Documents and Settings/Eugene

                            
Song/SmartTransducerServices/web/WEB-INF/wsdl/SmartTransducerServices.wsdl
     
              
           
                  
07/21/2006 09:17:09: Finished parsing WSDL.
   
                
07/21/2006
                  
09:17:20: Starting web service client
creation...07/21/2006 09:17:27: Error occured while
creating
                
the
                  
proxy!Approach 2: Add service using
                            
http://localhost/SmartTransducerServices/build/web/WEB-INF/wsdl/SmartTransducerServices?wsdl
     
              
           
                  
The error information is as follows:Start
 
                            
http://localhost:8080/SmartTransducerServices/SmartTransducerServices?WSDL
     
              
           
                  
07/21/2006 09:16:27: Parsing WSDL. Please wait
      
                      
=== message truncated ===


---------------------------------------------------------------------To
unsubscribe, e-mail:
users-unsubscribe_at_jax-ws.dev.java.netFor additional
commands, e-mail: users-help_at_jax-ws.dev.java.net


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