2013-08-29 64 views
-5

我對與SOAP服務的Java接口規範怪異異常,對於字符串輸入:「」異常

我已生成的源代碼,由於WSDL和我把我的項目,但我不能工作正常,我belove異常,但奇怪的是我那裁剪WSDL源代碼,並建立一個新項目,該項目只是存在於該版本,和它的工作,我不能找到一種方法, 等待你的答覆


FATAL [ACTIVE] ExecuteThread:'11 'for queue:'weblogic.kernel.Default(self-tuning)' - 29.08.2013 17:32:41,602 Thu EEST javax.servlet.ServletException:javax.xml.ws.WebServiceException:java.io.IOException:For input字符串: 「」

javax.servlet.ServletException: javax.xml.ws.WebServiceException: java.io.IOException: For input string: "" 
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420) 
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) 
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:844) 
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242) 
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216) 
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132) 
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338) 
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25) 
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74) 
    at com.netas.vas.tic.ws.aop.LoggingFilter.doFilter(LoggingFilter.java:49) 
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74) 
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3288) 
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254) 
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) 
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) 
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57) 
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163) 
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089) 
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074) 
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513) 
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254) 
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) 
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) 
Caused by: javax.xml.ws.WebServiceException: java.io.IOException: For input string: "" 
    at com.sun.xml.ws.streaming.TidyXMLStreamReader.close(TidyXMLStreamReader.java:73) 
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:421) 
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:184) 
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:154) 
    at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:139) 
    at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:287) 
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:249) 
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:200) 
    at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:190) 
    at weblogic.wsee.jaxws.spi.WLSServiceDelegate.<init>(WLSServiceDelegate.java:89) 
    at weblogic.wsee.jaxws.spi.WLSProvider$ServiceDelegateImpl.<init>(WLSProvider.java:674) 
    at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:141) 
    at weblogic.wsee.jaxws.spi.WLSProvider.createServiceDelegate(WLSProvider.java:114) 
    at javax.xml.ws.Service.<init>(Service.java:92) 
    at com.netas.vas.tic.ws.client.freeurl.subscription.SOF99SubscriptionCreateRequestWithControl_Service.<init>(SOF99SubscriptionCreateRequestWithControl_Service.java:45) 
    at com.netas.vas.tic.ws.rest.RegisterResource.freeUrl(RegisterResource.java:390) 
    at com.netas.vas.tic.ws.rest.RegisterResource.newPerson(RegisterResource.java:214) 
    at com.netas.vas.tic.ws.rest.RegisterResource.register(RegisterResource.java:139) 
    at com.netas.vas.tic.ws.rest.RegisterResource_msujha_NoIntfViewImpl.__WL_invoke(Unknown Source) 
    at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:31) 
    at com.netas.vas.tic.ws.rest.RegisterResource_msujha_NoIntfViewImpl.register(Unknown Source) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at weblogic.jaxrs.dispatch.EJBDispatchProvider$EJBMethodInvoker.invoke(EJBDispatchProvider.java:58) 
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) 
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) 
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288) 
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) 
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) 
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) 
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469) 
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400) 
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) 
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) 
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) 
    ... 23 more 
Caused by: java.io.IOException: For input string: "" 
    at weblogic.utils.http.HttpChunkInputStream.initChunk(HttpChunkInputStream.java:69) 
    at weblogic.utils.http.HttpChunkInputStream.skip(HttpChunkInputStream.java:215) 
    at weblogic.utils.http.HttpChunkInputStream.skipAllChunk(HttpChunkInputStream.java:395) 
    at weblogic.utils.http.HttpChunkInputStream.close(HttpChunkInputStream.java:291) 
    at weblogic.net.http.KeepAliveStream.close(KeepAliveStream.java:122) 
    at com.sun.xml.ws.streaming.TidyXMLStreamReader.close(TidyXMLStreamReader.java:71) 
    ... 59 more 

----------------------------------- -------------------------------------------------- -------

+1

請提供相關的源代碼,測試方法和測試案例。 –

+0

爲什麼5人向我發送了反對票,okey我會加 –

+0

如果*你*還沒有找到問題,我確信你有所有的信息,你如何期待我們可以?其他的選擇是:1)碰巧看到你的問題的人也出現同樣的原因經歷完全相同的症狀(很少見,因爲這個職位只有45個視圖)2)我們比你更聰明數千萬倍(這比以前更加困難)。所以? **我們需要更多信息** –

回答

0

我說我的服務類

package freeurl.subscription; 

import java.net.MalformedURLException; 
import java.net.URL; 
import javax.xml.namespace.QName; 
import javax.xml.ws.WebEndpoint; 
import javax.xml.ws.WebServiceClient; 
import javax.xml.ws.WebServiceFeature; 
import javax.xml.ws.Service; 

/** 
* This class was generated by Apache CXF 2.7.5 
* 2013-06-11T16:22:49.956+03:00 
* Generated source version: 2.7.5 
* 
*/ 
@WebServiceClient(name = "SO_F99_SubscriptionCreateRequestWithControl", 
        wsdlLocation = "http:/bla.bla:9700/orabpel/default/SO_F99_SubscriptionCreateRequestWithControl/2.2?wsdl", 
        targetNamespace = "http://www.accenture.com/assets/sdp/sync/SO_F99_SubscriptionCreateRequestWithControl") 
public class SOF99SubscriptionCreateRequestWithControl_Service extends Service { 

    public final static URL WSDL_LOCATION;`enter code here` 

    public final static QName SERVICE = new QName("http://www.accenture.com/assets/sdp/sync/SO_F99_SubscriptionCreateRequestWithControl", "SO_F99_SubscriptionCreateRequestWithControl"); 
    public final static QName SOF99SubscriptionCreateRequestWithControlPort = new QName("http://www.accenture.com/assets/sdp/sync/SO_F99_SubscriptionCreateRequestWithControl", "SO_F99_SubscriptionCreateRequestWithControlPort"); 
    static { 
     URL url = null; 
     try { 
      url = new URL("http://bla.bla:9700/orabpel/default/SO_F99_SubscriptionCreateRequestWithControl/2.2"); 
     } catch (MalformedURLException e) { 
      java.util.logging.Logger.getLogger(SOF99SubscriptionCreateRequestWithControl_Service.class.getName()) 
       .log(java.util.logging.Level.INFO, 
        "Can not initialize the default wsdl from {0}", "http://10.201.148.51:9700/orabpel/default/SO_F99_SubscriptionCreateRequestWithControl/SO_F99_SubscriptionCreateRequestWithControl?wsdl"); 
     } 
     WSDL_LOCATION = url; 
    } 

    public SOF99SubscriptionCreateRequestWithControl_Service(URL wsdlLocation) { 
     super(wsdlLocation, SERVICE); 
    } 

    public SOF99SubscriptionCreateRequestWithControl_Service(URL wsdlLocation, QName serviceName) { 
     super(wsdlLocation, serviceName); 
    } 

    public SOF99SubscriptionCreateRequestWithControl_Service() { 
     super(WSDL_LOCATION, SERVICE); 
    } 


    /** 
    * 
    * @return 
    *  returns SOF99SubscriptionCreateRequestWithControl 
    */ 
    @WebEndpoint(name = "SO_F99_SubscriptionCreateRequestWithControlPort") 
    public SOF99SubscriptionCreateRequestWithControl getSOF99SubscriptionCreateRequestWithControlPort() { 
     return super.getPort(SOF99SubscriptionCreateRequestWithControlPort, SOF99SubscriptionCreateRequestWithControl.class); 
    } 

    /** 
    * 
    * @param features 
    *  A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. 
    * @return 
    *  returns SOF99SubscriptionCreateRequestWithControl 
    */ 
    @WebEndpoint(name = "SO_F99_SubscriptionCreateRequestWithControlPort") 
    public SOF99SubscriptionCreateRequestWithControl getSOF99SubscriptionCreateRequestWithControlPort(WebServiceFeature... features) { 
     return super.getPort(SOF99SubscriptionCreateRequestWithControlPort, SOF99SubscriptionCreateRequestWithControl.class, features); 
    } 

} 

,我在這裏呼籲該服務

public TSOresult freeUrl(Msisdn msisdn) { 
     QName SERVICE_NAME = new QName("http://www.accenture.com/assets/sdp/sync/SO_F99_SubscriptionCreateRequestWithControl", "SO_F99_SubscriptionCreateRequestWithControl"); 
     // URL wsdlURL = SOF99SubscriptionCreateRequestWithControl_Service.WSDL_LOCATION; 
     VasLogger.logInfo("Free URL WSDL " + FreeUrlConfig.getFreeUrlWsdl() + " with msisdn " + msisdn.asUsername()); 
     URL wsdlURL = null; 
     try { 
      wsdlURL = new URL(FreeUrlConfig.getFreeUrlWsdl()); 
     } catch (MalformedURLException ex) { 
      VasLogger.logError("Free url error: " + FreeUrlConfig.getFreeUrlWsdl() + " " + wsdlURL.toString(), ex); 
     } catch (Exception e) { 
      VasLogger.logError("Free url error: " + FreeUrlConfig.getFreeUrlWsdl() + " " + wsdlURL.toString(), e); 
     } 


     SOF99SubscriptionCreateRequestWithControl_Service ss = new SOF99SubscriptionCreateRequestWithControl_Service(wsdlURL, SERVICE_NAME); 
     SOF99SubscriptionCreateRequestWithControl port = ss.getSOF99SubscriptionCreateRequestWithControlPort(); 
     ObjectFactory objectFactory = new ObjectFactory(); 


     com.netas.vas.tic.ws.client.freeurl.subscription.TSODATA _process_payloadVal = objectFactory.createTSODATA(); 

     javax.xml.ws.Holder<com.netas.vas.tic.ws.client.freeurl.subscription.TSODATA> _process_payload = new javax.xml.ws.Holder<com.netas.vas.tic.ws.client.freeurl.subscription.TSODATA>(_process_payloadVal); 
     TSOheader header = objectFactory.createTSOheader(); 
     String transactionIdStr = "848" + CodeGenerator.generateCode(16, CodeType.NUMERIC); //transactionId(); 

     header.setMSISDN(msisdn.asUsername()); 
     header.setOrderId(transactionIdStr); 
     TSOattributes attributes = objectFactory.createTSOattributes(); 
     List<Attribute> attributeList = attributes.getAttribute(); 

     Attribute channel = new Attribute(); 
     channel.setName("CHANNEL"); 
     channel.setValue("VAS Server"); 

     Attribute userId = new Attribute(); 
     userId.setName("USER_ID"); 
     userId.setValue(FreeUrlConfig.getUserId()); 

     Attribute application = new Attribute(); 
     application.setName("APPLICATION"); 
     application.setValue(FreeUrlConfig.getApplication()); 

     Attribute transactionId = new Attribute(); 
     transactionId.setName("TRANSACTION_ID"); 
     transactionId.setValue(transactionIdStr); 

     Attribute catalogOfferId = new Attribute(); 
     catalogOfferId.setName("CATALOG_OFFER_ID"); 
     catalogOfferId.setValue(FreeUrlConfig.getOfferId()); 

     Attribute campaignId = new Attribute(); 
     campaignId.setName("CAMPAIGN_ID"); 
     campaignId.setValue(FreeUrlConfig.getCampaignId()); 

     Attribute msisdnAttr = new Attribute(); 
     msisdnAttr.setName("MSISDN"); 
     msisdnAttr.setValue(msisdn.asUsername()); 

     Attribute callPermissionFlowFlag = new Attribute(); 
     callPermissionFlowFlag.setName("CALL_PERMISSION_FLOW_FLAG"); 
     callPermissionFlowFlag.setValue(FreeUrlConfig.isCallPermissionFlowFlagActive() ? "Y" : "N"); 


     attributeList.add(channel); 
     attributeList.add(userId); 
     attributeList.add(application); 
     attributeList.add(transactionId); 
     attributeList.add(catalogOfferId); 
     attributeList.add(campaignId); 
     attributeList.add(msisdnAttr); 
     attributeList.add(callPermissionFlowFlag); 


     _process_payloadVal.setTSOheader(header); 
     _process_payloadVal.setTSOattributes(attributes); 
     port.process(_process_payload); 

     VasLogger.logInfo("FREE URL PROCESS PAYLOAD: " + _process_payload.toString() + " ATTRIBUTES " + attributes); 

     return _process_payload.value.getTSOresult(); 
    } 

+0

沒有人知道? –

相關問題