对于无法解析http://schemas.xmlsoap.org/wsdl/soap/的绑定感兴趣的读者,本文将会是一篇不错的选择,我们将详细介绍无法解析什么意思,并为您提供关于android–org
对于无法解析http://schemas.xmlsoap.org/wsdl/soap/的绑定感兴趣的读者,本文将会是一篇不错的选择,我们将详细介绍无法解析什么意思,并为您提供关于android – org.xmlpull.v1.XmlPullParserException:expected:START_TAG {http://schemas.xmlsoap.org/soa、apache – 无法设置php_value’soap.wsdl_cache_dir’、centos php-soap Soap WSDL Error - "failed to load external entity、cxf websphere org/apache/ws/commons/schema/XmlSchemaCollection.read的有用信息。
本文目录一览:- 无法解析http://schemas.xmlsoap.org/wsdl/soap/的绑定(无法解析什么意思)
- android – org.xmlpull.v1.XmlPullParserException:expected:START_TAG {http://schemas.xmlsoap.org/soa
- apache – 无法设置php_value’soap.wsdl_cache_dir’
- centos php-soap Soap WSDL Error - "failed to load external entity
- cxf websphere org/apache/ws/commons/schema/XmlSchemaCollection.read
无法解析http://schemas.xmlsoap.org/wsdl/soap/的绑定(无法解析什么意思)
我正在使用apache cxf + spring,这些东西在Eclipse中运行,但不在命令行中运行。不断获取错误无法解决绑定
答案1
小编典典解决方案:
- 步骤1:使用Maven Shade插件
- 第二步:如果您在cxf中使用spring,请确保在@Configuration类中添加以下内容
@ImportResource({“” classpath:META-INF / cxf / cxf.xml“,” classpath:META-INF /
cxf / cxf-extension http.xml“,” classpath:META-INF / cxf / cxf-extension-soap。
xml“})
要么
<import resource="classpath:META-INF/cxf/cxf.xml" /><import resource="classpath:META-INF/cxf/cxf-extension-http.xml" /><import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
功不可没
http://www.java-
allandsundry.com/2011/01/orgapachecxfservicefactoryserviceconstr.html
android – org.xmlpull.v1.XmlPullParserException:expected:START_TAG {http://schemas.xmlsoap.org/soa
你好我在webservice这里新建我正在使用SOAP服务并在localhost上运行但是收到此错误这是我的代码:public class Neteesh extends Activity {
private static final String URL = "http://localhost:7642/Service1.asmx";
private static final String NAMESPACE = "http://tempuri.org/";
private static final String METHOD_NAME = "HelloWorld";
private static final String SOAP_ACTION = "http://tempuri.org/HelloWorld";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView textView = new TextView(this);
setContentView(textView);
new LongOperation().execute("");
}
private class LongOperation extends AsyncTask<String, Void, String>
{
@Override
protected String doInBackground(String... HelloWorldResult)
{
// Todo Auto-generated method stub
String value = new String();
System.out.println("Inside getLognoperation method...........");
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("billId", HelloWorldResult);
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet=true;
soapEnvelope.setoutputSoapObject(request);
AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL);
try
{
androidHttpTransport.call(SOAP_ACTION, soapEnvelope);
SoapPrimitive resultString = (SoapPrimitive)soapEnvelope.getResponse();
value = resultString.toString();
System.out.println("This getAccountsNames xmls is : "+value);
} catch (Exception e) {
e.printstacktrace ();
}
return value;
}
}
}
这是我的logcat:
11-16 11:11:48.371: W/System.err(1324): org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <HTML>@2:7 in java.io.InputStreamReader@4101fc30)
11-16 11:11:48.371: W/System.err(1324): at org.kxml2.io.KXmlParser.require(KXmlParser.java:2046)
11-16 11:11:48.371: W/System.err(1324): at org.ksoap2.soapEnvelope.parse(SoapEnvelope.java:127)
11-16 11:11:48.381: W/System.err(1324): at org.ksoap2.transport.Transport.parseResponse(Transport.java:63)
11-16 11:11:48.381: W/System.err(1324): at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:100)
11-16 11:11:48.381: W/System.err(1324): at com.example.helloworldwebservice.Neteesh$LongOperation.doInBackground(Neteesh.java:55)
11-16 11:11:48.381: W/System.err(1324): at com.example.helloworldwebservice.Neteesh$LongOperation.doInBackground(Neteesh.java:1)
11-16 11:11:48.381: W/System.err(1324): at android.os.AsyncTask$2.call(AsyncTask.java:287)
11-16 11:11:48.381: W/System.err(1324): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
11-16 11:11:48.391: W/System.err(1324): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
11-16 11:11:48.391: W/System.err(1324): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
11-16 11:11:48.404: W/System.err(1324): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
11-16 11:11:48.404: W/System.err(1324): at java.lang.Thread.run(Thread.java:856)
11-16 11:11:48.404: W/System.err(1324): [ 11-16 11:11:48.404 1324: 1337 I/expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG Exception
如果我的结构错误,请编辑问题,如何解决它.我需要在webservice中的字符串响应.请提前帮助谢谢..
解决方法:
由于Android模拟器在虚拟机上运行,因此您必须使用它
private static final String URL = "http://10.0.2.2:7642/Service1.asmx";
代替
private static final String URL = "http://localhost:7642/Service1.asmx";
接着
protected String doInBackground(String... HelloWorldResult)
{
.....
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("billId", HelloWorldResult[0]);
.....
}
你现在正在尝试……
apache – 无法设置php_value’soap.wsdl_cache_dir’
我有运行Apache 2.2.4和PHP-FPM(FastCGI Process Manager)的VPS服务器(CentOS 6.5).查看PHP-fpm error_log我发现每个spawn PHP-fpm子进程都出错了:
WARNING: [pool www] child 24086 said into stderr: "ERROR: Unable to set PHP_value 'soap.wsdl_cache_dir'"
我找不到关于此警告谷歌搜索的任何信息.有人知道这意味着什么以及如何摆脱这种警告?
更新1:
apache的fastcgi.conf:
User apache
Group apache
LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
DirectoryIndex index.PHP index.html index.shtml index.cgi
AddHandler PHP5-fcgi .PHP
# For monitoring status with e.g. Munin
<LocationMatch "/(ping|status)">
SetHandler PHP5-fcgi-virt
Action PHP5-fcgi-virt /PHP5-fcgi virtual
</LocationMatch>
Action PHP5-fcgi /PHP5-fcgi
Alias /PHP5-fcgi /usr/lib/cgi-bin/PHP5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/PHP5-fcgi -socket /tmp/PHP5-fpm.sock -pass-header Authorization
</IfModule>
# global FastCgiConfig can be overridden by FastCgiServer options in vhost config
FastCgiConfig -idle-timeout 20 -maxClassprocesses 1
这是PHP的PHP-fpm.conf和池配置:
pid = /var/run/PHP-fpm/PHP-fpm.pid
daemonize = yes
; Start a new pool named 'www'.
[www]
listen = /tmp/PHP5-fpm.sock
group = apache
pm = dynamic
pm.max_children = 8
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /status
ping.path = /ping
catch_workers_output = yes
PHP_admin_value[error_log] = /var/log/PHP-fpm/www-error.log
PHP_admin_flag[log_errors] = on
PHP_value[session.save_handler] = files
PHP_value[session.save_path] = /var/lib/PHP/session
PHP_value[soap.wsdl_cache_dir] = /var/lib/PHP/wsdlcache
其他一切都是违约的.
更新2:
按照建议手动创建/ var / lib / PHP / wsdlcache目录并将权限设置为770并将所有者设置为root:apache后,我希望我不会再次看到错误,但不幸的是在重启PHP-fpm进程后出现错误再次,这变得非常奇怪.
附:也许这个问题更适合serverfault,但通常在stackoverflow上有更多的PHP和apache配置专家.
解决方法:
我讨厌这么简单的解决方案.最后,我自己找到了问题和解决方案.留在这里以供其他有史以来的人参考.
FastCGI配置文件是在首次配置FastCGI时从互联网上获取的,因为之前我没有使用它.显示FastCGI配置的教程包含行PHP_value [soap.wsdl_cache_dir] = / var / lib / PHP / wsdlcache.我真的很感兴趣什么是SOAP,因为我没有在我在这台服务器上运行的网站上使用它,这种好奇心为我带来了解决方案.实际上我不需要SOAP,只是删除该行就可以解决问题我想,但我决定把它留在那里,发现我只需要安装PHP-soap.
yum install PHP-soap
对于RHEL / CentOS
重新启动PHP-fpm后,我没有收到重生fpm进程的错误.
centos php-soap Soap WSDL Error - "failed to load external entity
centos 上的 php-soap,每天都会报 Soap WSDL Error - "failed to load external entity 这个错误
重启 php-fpm 后就没问题了。不知是配置问题,还是什么其他问题
cxf websphere org/apache/ws/commons/schema/XmlSchemaCollection.read
使用cxf在本地tomcat发布webservice没有问题,到测试环境的websphere8上启动就报错。
java.lang.NoSuchMethodError: org/apache/ws/commons/schema/XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchema; at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:133) at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:192) at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:95) at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:388) at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:474) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:536) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:248) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101) at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159) at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:454) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1612) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1553) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483) ... 37 more
org.apache.ws.commons.schema.XmlSchemaCollection是在xmlschema-core-2.0.3.jar包里的。
把WebSphere配置的类加载器以父最后都不行。
原本以为XmlSchemaCollection和WebSphere自带的有冲突,删掉xmlschema-core-2.0.3.jar还是报同样的错误。
现在我还是觉得是WebSphere里自带了org.apache.ws.commons.schema.XmlSchemaCollection这个,要不然删掉我的xmlschema-core-2.0.3.jar为什么还是报这个错误呢?WebSphere里的jar这么多,如何找到啊,还 是其他原因导致的??
我们今天的关于无法解析http://schemas.xmlsoap.org/wsdl/soap/的绑定和无法解析什么意思的分享已经告一段落,感谢您的关注,如果您想了解更多关于android – org.xmlpull.v1.XmlPullParserException:expected:START_TAG {http://schemas.xmlsoap.org/soa、apache – 无法设置php_value’soap.wsdl_cache_dir’、centos php-soap Soap WSDL Error - "failed to load external entity、cxf websphere org/apache/ws/commons/schema/XmlSchemaCollection.read的相关信息,请在本站查询。
本文标签: