我有一些要求,我想在我使用my spring应用程序的属性文件中编写/更新值.
我用谷歌搜索了它,但我还没有找到使用Spring的直接方法.
有没有人知道如何做或有任何最好的方法来做到这一点.
提前致谢.
我正在尝试通过存根调用 Web 服务。它是 wsdl 网络服务
但是我在调用它时遇到以下错误。
轴故障
故障代码:{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
故障子代码:
faultString: java.net.SocketTimeoutException: 读取超时
故障演员:
故障节点:
故障详情:
{http://xml.apache.org/axis/}stackTrace:java.net.SocketTimeoutException:读取超时
在 org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
在 org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
在 org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
在 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
在 com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(XMLNSDocumentScannerImpl.java:719)
在 com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
在 com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
在 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
在 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
在 com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
在 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
在 javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
在 org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
在 org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
在 org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
在 org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
在 org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
在 org.apache.axis.client.Call.invokeEngine(Call.java:2784)
在 org.apache.axis.client.Call.invoke(Call.java:2767)
在 org.apache.axis.client.Call.invoke(Call.java:2443)
在 org.apache.axis.client.Call.invoke(Call.java:2366)
在 org.apache.axis.client.Call.invoke(Call.java:1812)
在 com.vtech.external.implementation.qantas.QantasServices.DistributorPortSoapBindingStub.getAccommodationAvailability(DistributorPortSoapBindingStub.java:1675)
在 com.vtech.external.implementation.tripAdvisor.bizaction.Test.main(Test.java:68)
{http://xml.apache.org/axis/}主机名:vibpj160
我正在尝试使用 spring-boot (1.2.4.RELEASE) 将 Web 服务服务器作为独立应用程序运行。我参考了这里提供的教程。
但在我的应用程序中,我无法在 Spring Boot 的任何 API 中找到 org.springframework.boot.SpringApplication 类。
下面是我为此使用的 pom.xml 文件:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.4.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Run Code Online (Sandbox Code Playgroud)
谁能帮我找出这可能出了什么问题。
我正在用 Java 编写一个 Android 应用程序,该应用程序使用 Android 配件 API 与 USB 配件进行通信。
在谷歌文档并没有给出实际读取和写入数据,只是如何打开附件进行通信的例子。
它还说明了两件事:
我实现了这样的阅读:
/** boiler plate from example docs: **/
fileDescriptor = usbManager.openAccessory(accessory);
if (fileDescriptor != null) {
FileDescriptor fd = fileDescriptor.getFileDescriptor();
inputStream = new FileInputStream(fd);
readBuffer = new byte[16384];
// ... some more code that is not relevant for reading data ... //
}
/** my code in separate thread: **/
int read;
while ((read = …Run Code Online (Sandbox Code Playgroud) 我在创建xml时遇到问题
<c:condition>
<a:condition>
<fieldName>fieldName</fieldName>
<fieldTest>fieldTest</fieldTest>
<fieldValues>
<fieldValue>fieldValue</fieldValue>
</fieldValues>
</a:condition>
<operator>operator</operator>
<a:condition>
<fieldName>fieldName</fieldName>
<fieldTest>fieldTest</fieldTest>
<fieldValues>
<fieldValue>fieldValue</fieldValue>
</fieldValues>
</a:condition>
</c:condition>
Run Code Online (Sandbox Code Playgroud)
上面是给我的xml标记。
我需要使用Java中的JDOM / XML创建此标签。
所以我正在使用
Element complexCondition = new Element("c:condition");
Run Code Online (Sandbox Code Playgroud)
创建“ c:condition”标签的代码。
但是我出错了
org.jdom.IllegalNameException: The name "c:condition" is not legal for JDOM/XML elements: Element names cannot contain colons.
Run Code Online (Sandbox Code Playgroud)
所以不知道出了什么问题。因为我是xml和JDOM的新手。请帮我解决这个问题。
java ×5
spring ×2
web-services ×2
accessory ×1
android ×1
axis ×1
jdom ×1
netbeans ×1
spring-boot ×1
spring-web ×1
usb ×1
xml ×1